MDL-83501 core: URL encode paths for Nginx X-Accel-Redirect

This commit is contained in:
rajandangi 2024-10-21 18:59:21 +10:30
parent ecfcf00d92
commit ce040cb114

View File

@ -84,6 +84,8 @@ function xsendfile($filepath) {
if (!$aliased) {
return false;
}
// Nginx expects the path to be url encoded see https://trac.nginx.org/nginx/ticket/316.
$filepath = rawurlencode($filepath);
}
header("$CFG->xsendfile: $filepath");