This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 62f46bf Name will already have been decoded/unescaped
62f46bf is described below
commit 62f46bfa2616e3d34bf23a62ea879ddab4d5cdb8
Author: Sebb <[email protected]>
AuthorDate: Tue Sep 29 20:35:48 2020 +0100
Name will already have been decoded/unescaped
If not, that needs to be fixed at source to avoid double decoding
---
www/secretary/workbench/models/message.rb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/www/secretary/workbench/models/message.rb
b/www/secretary/workbench/models/message.rb
index f18c8ea..4e27b9b 100644
--- a/www/secretary/workbench/models/message.rb
+++ b/www/secretary/workbench/models/message.rb
@@ -32,13 +32,11 @@ class Message
name = name.dup.force_encoding('utf-8')
headers = @headers[:attachments].find do |attach|
- attach[:name] == name or URI.decode(attach[:name]) == name or
- attach['Content-ID'].to_s == '<' + name + '>'
+ attach[:name] == name or attach['Content-ID'].to_s == "<#{name}>"
end
part = mail.attachments.find do |attach|
- attach.filename == name or URI.decode(attach.filename) == name or
- attach['Content-ID'].to_s == '<' + name + '>'
+ attach.filename == name or attach['Content-ID'].to_s == "<#{name}>"
end
if headers