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.

        Issue Links

          Activity

          Hide
          riadh riadh added a comment -

          I send a pull request for this bug.

          Show
          riadh riadh added a comment - I send a pull request for this bug.
          Hide
          nickvergessen Joas Schilling added a comment -

          See comment on the PR

          Show
          nickvergessen Joas Schilling added a comment - See comment on the PR
          Hide
          bantu Andreas Fischer added a comment -

          It's about time we have this. Set to Blocker.

          Show
          bantu Andreas Fischer added a comment - It's about time we have this. Set to Blocker.
          Hide
          *daniel *daniel added a comment -

          I have tested this on IE 9 however I don't have access to a computer with IE 10.

          Show
          *daniel *daniel added a comment - I have tested this on IE 9 however I don't have access to a computer with IE 10.

            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:

                Development