PHP Classes

Bug for filename with quotation mark

Recommend this page to a friend!

      PHP MIME Email Message Parser  >  All threads  >  Bug for filename with quotation mark  >  (Un) Subscribe thread alerts  
Subject:Bug for filename with quotation mark
Summary:Escaped quotation mark is not honored
Messages:8
Author:abc def
Date:2022-01-13 00:14:03
 

  1. Bug for filename with quotation mark   Reply   Report abuse  
Picture of abc def abc def - 2022-01-13 00:14:03
I do not receive a proper FileName for attached files with quotation marks.

I am pretty sure, it is one of these lines (but it's in the middle of the night)

Content-Type: text/plain; charset=UTF-8; name="a\"b.txt"
Content-Disposition: attachment; filename="a\"b.txt"

The parser returns the FileName a\

  2. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-01-13 03:12:50 - In reply to message 1 from abc def
Hello,

Thank you for reporting. I need more time to take a look at this.

Can you wait until the weekend so I can try to reproduce the problem?

  3. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of abc def abc def - 2022-01-13 20:35:46 - In reply to message 2 from Manuel Lemos
You don't need to hurry for me. I discovered this bug by accident. It doesn't break anything, here. But I thought it would be fair to spend the time reporting (and doing a superficial analysis). Thanks for all the work you've already put into this project.

  4. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-01-14 01:10:16 - In reply to message 3 from abc def
Sure. At least I will get back to you on this after the weekend.

  5. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-01-17 07:49:00 - In reply to message 3 from abc def
Hello,

I just found the bug and fixed it. I also have updated the site with the latest version.

Can you please try the package and let me know if it works well for you now?

  6. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of abc def abc def - 2022-01-18 09:08:02 - In reply to message 5 from Manuel Lemos
Looking at expect/quotedfilename.txt, I would expect a decoded a"b.txt, with the backslash removed. I don't know the RFC, but this is how Thunderbird encodes the filename. Actual backslashes in the filename would then be encodes as double backslashes. As I said, I don't know the RFC, but I know the logic this way: If there is a backslash, take the following character as literal this character. So, the encoded filename a\\b\"c\de.txt would be decoded as a\b"cde.txt

  7. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-01-20 02:10:18 - In reply to message 6 from abc def
Yes, you are correct of course. Please allow me a few more days so I can fix that over the weekend.

  8. Re: Bug for filename with quotation mark   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2022-01-23 08:20:57 - In reply to message 6 from abc def
Hello,

I just found and fixed the issue. Now the MIME parser class should be able to remove the escaping backslashes.

I also updated the version of the package that is in the site.

Can you please try it and let me know if it works for you now?

 
For more information send a message to info at phpclasses dot org.