Closed Bug 547748 Opened 15 years ago Closed 15 years ago

Wrong parsing of email_in emails if some @field has no data

Categories

(Bugzilla :: Incoming Email, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

If you leave @groups empty (to skip default groups) as below... @product Test1 @component comp1 @version 1.3 @groups ... email_in.pl complains that: "There is no version named '1.3 @groups' in the 'Test1' product." If I type |@groups =| (I added "="), then the parsing is fine. As "=" is optional since bug 526158, we should parse such cases correctly.
The problem comes from line 110: if ($line =~ /^\@(\S+)\s*(?:=|\s)\s*(.*)\s*/) If you simply pass @foo, it's appended to the previous field, because it doesn't match the regexp.
Ahh, probably putting a * after the = stuff and a +? on the \S would fix it.
Attached patch patch, v1Splinter Review
Also catch ^\@\S+\s*$
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
Attachment #461921 - Flags: review?(mkanat)
Summary: Wrong parsing if @foo has no data → Wrong parsing of email_in emails if some @field has no data
Comment on attachment 461921 [details] [diff] [review] patch, v1 Ah yeah, that's a simple, clever solution. :-)
Attachment #461921 - Flags: review?(mkanat) → review+
Flags: approval4.0+
Flags: approval3.6+
Flags: approval+
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified email_in.pl Committed revision 7410. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/ modified email_in.pl Committed revision 7354. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/3.6/ modified email_in.pl Committed revision 7149.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: