Merge branch 'MDL-83501-url-encode-nginx-paths-MOODLE_405_STABLE' of https://github.com/rajandangi/moodle into MOODLE_405_STABLE

This commit is contained in:
Andrew Nicols 2024-11-21 11:48:15 +08:00
commit 36f946b5db
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

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");