[Rt-commit] rt branch, 4.4/html-attachment-escaping, created. rt-4.4.0-116-g503ce40

Rachel Kelly rachel at bestpractical.com
Fri May 13 16:04:00 EDT 2016


The branch, 4.4/html-attachment-escaping has been created
        at  503ce401c3a9b89bfbe97aa9a7c1b0a8421b6bee (commit)

- Log -----------------------------------------------------------------
commit 503ce401c3a9b89bfbe97aa9a7c1b0a8421b6bee
Author: rachelkelly <rachel at bestpractical.com>
Date:   Thu May 5 13:27:19 2016 +0000

    Remove url-escaping character from attachment name parsing
    
        Attachments in ticket replies and comments are parsed incorrectly
        if they contain html characters.  Included url escaping and added
        requirement that no other escaping be done.  Attachment names
        which include ? and & and other url-sensitive characters will be
        preserved.
    
    Fixed: #I31751

diff --git a/share/html/Elements/ShowTransactionAttachments b/share/html/Elements/ShowTransactionAttachments
index d9aa8ba..fdd7cda 100644
--- a/share/html/Elements/ShowTransactionAttachments
+++ b/share/html/Elements/ShowTransactionAttachments
@@ -62,7 +62,7 @@ foreach my $message ( @{ $Attachments->{ $Parent || 0 } || [] } ) {
 % if (my $url = RT->System->ExternalStorageURLFor($message)) {
 <a href="<% $url %>">
 % } else {
-<a href="<% $AttachmentPath %>/<% $Transaction->Id %>/<% $message->Id %>/<% $name | u%>">
+<a href="<% $AttachmentPath %>/<% $Transaction->Id %>/<% $message->Id %>/<% $name | un %>">
 % }
 <&|/l&>Download</&> <% length $name ? $name : loc('(untitled)') %></a>\
 % if ( $DownloadableHeaders && ! length $name && $message->ContentType =~ /text/  ) {

-----------------------------------------------------------------------


More information about the rt-commit mailing list