Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10820

Display images directly in IE9 and 10 instead of download

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.0.12-RC1
    • 3.0.10
    • None
    • None

      In download/file.php we have special code that deals with IE8 for attachments/avatar display.

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

      		if (empty($user->browser) || (!$is_ie8 && (strpos(strtolower($user->browser), 'msie') !== false)))
      		{
      			header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
      			...
      		}
      		else
      		{
      			header('Content-Disposition: ' . ((strpos($attachment['mimetype'], 'image') === 0) ? 'inline' : 'attachment') . '; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
      			...
      		}

      This means that when you visit an attachment directly its downloaded in IE9 and not displayed in the browser like in IE8. The check should be changed so it just uses download for IE <8 if that is not a security risk.

            dhruv.goel92 Dhruv Goel [X] (Inactive)
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: