email_in.pl incorrectly rejects quoted charsets

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Incoming Email
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

3.0.3
Bugzilla 3.0
Bug Flags:
approval +
approval3.0 +

Details

Attachments

(1 attachment)

678 bytes, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

9 years ago
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.
Attachment #298722 - Flags: review?(mkanat)

Comment 1

9 years ago
Comment on attachment 298722 [details] [diff] [review]
patch, v1

No, that will include the final quote in the charset.
Attachment #298722 - Flags: review?(mkanat) → review-
(Assignee)

Comment 2

9 years ago
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.
Attachment #298722 - Flags: review- → review?(mkanat)

Comment 3

9 years ago
Comment on attachment 298722 [details] [diff] [review]
patch, v1

Ohhh, duh! :-) Okay. :-)
Attachment #298722 - Flags: review?(mkanat) → review+

Updated

9 years ago
Flags: approval3.0+
Flags: approval+
(Assignee)

Comment 4

9 years ago
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
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Assignee)

Updated

9 years ago
Duplicate of this bug: 418930
You need to log in before you can comment on or make changes to this bug.