We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b97e32 + e943cc7 commit d4bc241Copy full SHA for d4bc241
1 file changed
docker/nginx/js/decode.js
@@ -9,8 +9,10 @@ function decodeBase64(r) {
9
}
10
11
try {
12
- var decodedValue = atob(encodedValue);
13
- r.return(200, decodedValue);
+ // Use Buffer to return raw bytes — atob() returns a JS string which r.return()
+ // would re-encode as UTF-8, corrupting any non-ASCII bytes (e.g. in filenames
14
+ // like "Pokémon") and causing CRC mismatches in the mod_zip manifest.
15
+ r.return(200, Buffer.from(encodedValue, 'base64'));
16
} catch (e) {
17
r.return(400, "Invalid Base64 encoding");
18
0 commit comments