Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10820

Display images directly in IE9 and 10 instead of download

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.10
    • Fix Version/s: 3.0.12-RC1
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhruv.goel92 Dhruv Goel
                Reporter:
                nickvergessen Joas Schilling
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: