Last Comment Bug 413672 - email_in.pl incorrectly rejects quoted charsets
: email_in.pl incorrectly rejects quoted charsets
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Incoming Email (show other bugs)
: 3.0.3
: All All
: -- normal (vote)
: Bugzilla 3.0
Assigned To: Frédéric Buclin
: default-qa
:
Mentors:
: 418930 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-23 08:50 PST by Frédéric Buclin
Modified: 2008-02-21 15:51 PST (History)
1 user (show)
mkanat: approval+
mkanat: approval3.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch, v1 (678 bytes, patch)
2008-01-23 08:50 PST, Frédéric Buclin
mkanat: review+
Details | Diff | Splinter Review

Description Frédéric Buclin 2008-01-23 08:50:47 PST
Created attachment 298722 [details] [diff] [review]
patch, v1

email_in.pl fails to parse

  Content-Type: text/plain; charset="UTF-8"

despite it's a valid header. The reason is that bug 366296, which introduced the parsing for the charset, doesn't expect quotes in it: /charset=([^;]+)/. This makes several incoming emails to be rejected.
Comment 1 Max Kanat-Alexander 2008-01-23 13:35:14 PST
Comment on attachment 298722 [details] [diff] [review]
patch, v1

No, that will include the final quote in the charset.
Comment 2 Frédéric Buclin 2008-01-23 13:41:39 PST
Comment on attachment 298722 [details] [diff] [review]
patch, v1

>+        if ($ct =~ /charset="?([^;"]+)/) {

Max, the final quote is excluded from the charset. I wrote [^;"]+, not [^;]+. Please reconsider.
Comment 3 Max Kanat-Alexander 2008-01-25 16:14:53 PST
Comment on attachment 298722 [details] [diff] [review]
patch, v1

Ohhh, duh! :-) Okay. :-)
Comment 4 Frédéric Buclin 2008-01-26 02:43:22 PST
tip:

Checking in email_in.pl;
/cvsroot/mozilla/webtools/bugzilla/email_in.pl,v  <--  email_in.pl
new revision: 1.13; previous revision: 1.12
done

3.0.3:

Checking in email_in.pl;
/cvsroot/mozilla/webtools/bugzilla/email_in.pl,v  <--  email_in.pl
new revision: 1.5.2.5; previous revision: 1.5.2.4
done
Comment 5 Frédéric Buclin 2008-02-21 15:51:57 PST
*** Bug 418930 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.