From 7ccf18f65ed9f8e14bf2c786cb4a0efbcd711a5e Mon Sep 17 00:00:00 2001 From: Joshua Ebarvia Date: Sun, 19 Sep 2021 10:52:35 +0930 Subject: [PATCH] MDL-51165 mod_url: allow directory index url direct access --- mod/url/locallib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/url/locallib.php b/mod/url/locallib.php index 8209620868a..2e63a3ba3cb 100644 --- a/mod/url/locallib.php +++ b/mod/url/locallib.php @@ -380,8 +380,9 @@ function url_get_final_display_type($url) { } } - static $download = array('application/zip', 'application/x-tar', 'application/g-zip', // binary formats - 'application/pdf', 'text/html'); // these are known to cause trouble for external links, sorry + // Binaries and other formats that are known to cause trouble for external links. + static $download = ['application/zip', 'application/x-tar', 'application/g-zip', + 'application/pdf', 'text/html', 'document/unknown']; static $embed = array('image/gif', 'image/jpeg', 'image/png', 'image/svg+xml', // images 'application/x-shockwave-flash', 'video/x-flv', 'video/x-ms-wm', // video formats 'video/quicktime', 'video/mpeg', 'video/mp4',