aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_download.php
diff options
context:
space:
mode:
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>2016-09-07 03:17:44 +0200
committerDan Villiom Podlaski Christiansen <danchr@gmail.com>2016-09-07 03:17:44 +0200
commitce48b4de57e55ebdb6ee4bbc2eac2f81998cc671 (patch)
tree3ea442e4230126d89aff8d8720ee056e930dae71 /phpBB/includes/functions_download.php
parent65921a78915e0c9bf494e8c780681522644abf7d (diff)
downloadforums-ce48b4de57e55ebdb6ee4bbc2eac2f81998cc671.tar
forums-ce48b4de57e55ebdb6ee4bbc2eac2f81998cc671.tar.gz
forums-ce48b4de57e55ebdb6ee4bbc2eac2f81998cc671.tar.bz2
forums-ce48b4de57e55ebdb6ee4bbc2eac2f81998cc671.tar.xz
forums-ce48b4de57e55ebdb6ee4bbc2eac2f81998cc671.zip
[ticket/12133] fix download file names for WebKit-derived browsers
All browser engines that descend from WebKit declare themselves as Safari in the user agent, including Chrome. Currently, the code assumes that any Safari-like browser cannot handle the RFC-compliant filename syntax. At least for recent versions of Safari, this is no longer the case, and the legacy syntax results in URI-quoted filenames. Using the standard syntax works as expected in both Safari 9 and Chrome 45. The ticket reporting this issue is from January 2014, so we can safely ignore compatibility: any browser still relying on the previous behaviour is unlikely to receive security updates. PHPBB3-12133
Diffstat (limited to 'phpBB/includes/functions_download.php')
-rw-r--r--phpBB/includes/functions_download.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 2c6f62227c..c571de579e 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -284,7 +284,7 @@ function header_filename($file)
// There be dragons here.
// Not many follows the RFC...
- if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)
+ if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Konqueror') !== false)
{
return "filename=" . rawurlencode($file);
}