The default bug view has changed. See this FAQ.

createaccount.cgi needs to escape untrusted value for e-mail address (but maybe de-escape @ symbol)

RESOLVED FIXED in Bugzilla 2.14

Status

()

Bugzilla
Bugzilla-General
P3
normal
RESOLVED FIXED
17 years ago
4 years ago

People

(Reporter: Jesse Ruderman, Assigned: Tara Hernandez)

Tracking

unspecified
Bugzilla 2.14
Other
Other

Details

(Whiteboard: security, URL)

Attachments

(3 attachments)

Comment hidden (empty)
(Reporter)

Comment 1

17 years ago
occurs on both createaccount.cgi and the "log in" link at the bottom.

this escaping might need to be done on both branches (password e-mailed, bogus 
e-mail address).
(Reporter)

Updated

17 years ago
Blocks: 38852
Whiteboard: 2.14

Updated

16 years ago
Whiteboard: 2.14 → 2.14,security
moving to real milestones...
Whiteboard: 2.14,security → security
Target Milestone: --- → Bugzilla 2.14
Created attachment 33786 [details] [diff] [review]
simple fix, but is it sufficient?
This attachment patches CGI.pl's CheckEmailSyntax function to escape the
characters < , > , and & in the invalid email address that gets displayed to the
user as part of the error message when the user submits an invalid address. 
This method of filtering bad characters is generally considered less secure than
the alternate approach of allowing good characters (see f.e. the CERT advisory
linked from bug 38856).  Is it sufficient in this situation?

The most secure approach in this situation is not to display the invalid email
address at all, which is the approach I took in the data validation error
messages in bug 38854 and bug 38855.
Created attachment 33789 [details] [diff] [review]
the other approach (address not displayed in error message)
Keywords: patch, review

Comment 6

16 years ago
Hmm... which one's better? Guess that's the question.  Showing the e-mail
address as typed allows the user to see if they made a typo so they can slap
themselves on the forehead (BTW, that encoding could be done w/the
'html_quote()' sub).  I think that would be considered "good enough" as it's the
routine used to sanitize everything else sent to the user (such as this 
comment :)
Created attachment 33967 [details] [diff] [review]
uses html_quote and displays address

Comment 8

16 years ago
OK, looks good to me.

r=jake
r= justdave

Checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Moving to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.