Fix percent encoding in X-Accel paths

This commit is contained in:
Neon1201 2026-08-01 21:03:45 +12:00
parent d063d851e1
commit 10e94bd036

View file

@ -443,7 +443,7 @@ module.exports.encodeUriPath = (path) => {
const uri = new URL('/', 'file://') const uri = new URL('/', 'file://')
// we assign the path here to assure that URL control characters like # are // we assign the path here to assure that URL control characters like # are
// actually interpreted as part of the URL path // actually interpreted as part of the URL path
uri.pathname = path uri.pathname = path.replaceAll('%', '%25')
return uri.pathname return uri.pathname
} }