Skip to content

Commit

Permalink
Change downloading attachments encoding to urlencode (#1251335)
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Nov 18, 2013
1 parent b905202 commit c2ff4eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Eventum Issue Tracking System
- fix bug for adding time entries is broken at the end of month Edit (#1186330)
- Add Back-Off functionallity (Petter Sandholdt) (GH#4)
- Redirect to issues listing when signing in (Elan Ruusamäe)
- Change downloading attachments encoding to urlencode (Elan Ruusamäe) (#1251335)

2012-07-09, Version 2.3.3 RC3
- Fixed bug #1021258 where users password is not hashed when they are initially created (Bryan Alsdorf)
Expand Down
4 changes: 2 additions & 2 deletions lib/eventum/class.attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ function outputDownload(&$data, $filename, $filesize, $mimetype)
$filename = ev_gettext("Untitled");
}
$disposition = self::displayInline($mimetype) ? 'inline' : 'attachment';
$filename = Mime_Helper::encodeQuotedPrintable($filename);
$filename = rawurlencode($filename);
header("Content-Type: " . $mimetype);
header("Content-Disposition: {$disposition}; filename=\"{$filename}\"");
header("Content-Disposition: {$disposition}; filename=\"{$filename}\"; filename*=".APP_CHARSET."''{$filename}");
header("Content-Length: {$filesize}");
echo $data;
exit;
Expand Down

0 comments on commit c2ff4eb

Please sign in to comment.