Title: test: accept '?' from zipinfo in zip interop test by vedchaudhari · Pull Request #66979 · nodejs/node · GitHub
Open Graph Title: test: accept '?' from zipinfo in zip interop test by vedchaudhari · Pull Request #66979 · nodejs/node
X Title: test: accept '?' from zipinfo in zip interop test by vedchaudhari · Pull Request #66979 · nodejs/node
Description: When zipinfo is built without the natspec patch (Gentoo with USE="unicode -natspec", for example), test-zlib-zip-interop.js fails with: AssertionError [ERR_ASSERTION]: zipinfo missing unicode-名前.txt Turns out zipinfo runs every file name through fnfilter() before printing it, and that swaps any byte isprint() doesn't like for a ? (extract.c#L2895-L2924). Most distros switch that off (Debian, Ubuntu, Arch and Alpine build with NO_WORKING_ISPRINT, Fedora and openSUSE patch it, and natspec sets NO_SETLOCALE), but Gentoo without natspec doesn't, so the file shows up as unicode-??????.txt, one ? per byte. The test only checks for UNICODE_SUPPORT in unzip -v, and that doesn't tell you whether names get filtered. So now, if the exact name isn't in the listing, the test also accepts it with ? in place of the non-ASCII part. The ASCII part still has to match, and bsdtar still checks the real name when it extracts. To reproduce it, I built Info-ZIP 6.0 on Ubuntu 24.04 in WSL with the same target and flags Gentoo uses (linux_noasm, -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE, no natspec). With that zipinfo the test fails on main and passes with this change. It still passes with Ubuntu's normal zipinfo too. There's also #66978 for this. The main difference is that this one keeps the UNICODE_SUPPORT check, so macOS still skips the non-ASCII name. Apple's zipinfo only turns some of the bytes into ?: 名前 (e5 90 8d e5 89 8d) comes out as e5 3f 3f e5 3f 3f, so a plain ? pattern doesn't match there. I ran main, #66978 and this branch on a macOS runner (https://github.com/vedchaudhari/node/actions/runs/40075440958): main and this one pass, #66978 doesn't yet. @LiviaMedeiros can you check if this fixes it on your machine? Fixes: #66975 Assisted-by: Claude Code. I reproduced the issue, reviewed the change, and tested it with both zipinfo builds myself.
Open Graph Description: When zipinfo is built without the natspec patch (Gentoo with USE="unicode -natspec", for example), test-zlib-zip-interop.js fails with: AssertionError [ERR_ASSERTION]: zipinfo missing uni...
X Description: When zipinfo is built without the natspec patch (Gentoo with USE="unicode -natspec", for example), test-zlib-zip-interop.js fails with: AssertionError [ERR_ASSERTION]: zipinfo mis...
Opengraph URL: https://github.com/nodejs/node/pull/66979
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d506641a-3e40-c22a-67e6-7e7600457c59 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B396:572F9:7594A9:9D65D4:6B062FB6 |
| html-safe-nonce | bc3e504a5bd3e560671158e0591fa70e2d57c615640f838090da71f41419f1bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzk2OjU3MkY5Ojc1OTRBOTo5RDY1RDQ6NkIwNjJGQjYiLCJ2aXNpdG9yX2lkIjoiNjQ2ODI3NDgxODkxNDg1Njg4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6296ed7b4b78aa3ee4d4b63046327c1178b7bab781bdfb3591b40496785d140 |
| hovercard-subject-tag | pull_request:4993672449 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/66979/files |
| twitter:image | https://avatars.githubusercontent.com/u/84765263?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/84765263?s=400&v=4 |
| og:image:alt | When zipinfo is built without the natspec patch (Gentoo with USE="unicode -natspec", for example), test-zlib-zip-interop.js fails with: AssertionError [ERR_ASSERTION]: zipinfo missing uni... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width