mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
can't they decide on one single thing...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9341 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
bd316f9c48
commit
354f9edd4e
1 changed files with 5 additions and 2 deletions
|
@ -464,8 +464,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||||
|
|
||||||
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
||||||
$is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
|
$is_ie8 = (strpos(strtolower($user->browser), 'msie 8.0') !== false);
|
||||||
header('Content-Type: ' . $attachment['mimetype'] . (($is_ie8) ? '; authoritative=true;' : ''));
|
header('Content-Type: ' . $attachment['mimetype']);
|
||||||
|
if ($is_ie8)
|
||||||
|
{
|
||||||
|
header('X-Content-Type-Options: nosniff');
|
||||||
|
}
|
||||||
if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
|
if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
|
||||||
{
|
{
|
||||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||||
|
|
Loading…
Add table
Reference in a new issue