Closed Bug 413672 Opened 16 years ago Closed 16 years ago

email_in.pl incorrectly rejects quoted charsets

Categories

(Bugzilla :: Incoming Email, defect)

3.0.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(1 file)

Attached patch patch, v1Splinter Review
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 on attachment 298722 [details] [diff] [review]
patch, v1

No, that will include the final quote in the charset.
Attachment #298722 - Flags: review?(mkanat) → review-
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 on attachment 298722 [details] [diff] [review]
patch, v1

Ohhh, duh! :-) Okay. :-)
Attachment #298722 - Flags: review?(mkanat) → review+
Flags: approval3.0+
Flags: approval+
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
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.