Closed Bug 741171 Opened 13 years ago Closed 13 years ago

When clicking on a user name in show_bug.cgi, user activity doesn't work when email contains plus (+) - email address needs to be encoded

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mkmelin, Assigned: dkl)

Details

Attachments

(1 file, 2 obsolete files)

The user activity link doesn't find anything when the user email contains +. E.g. https://bugzilla.mozilla.org/page.cgi?id=user_activity.html&action=run&from=2012-03-18&to=2012-04-01&who=mkmelin+mozilla@iki.fi -- nothing. The email address needs to be encoded (+ is interpreted as a space).
Assignee: general → nobody
Component: Bugzilla-General → Extensions: Other
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa → extensions
Version: unspecified → Current
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Attachment #611576 - Flags: review?(glob)
Comment on attachment 611576 [details] [diff] [review] Patch to allow + in email for user activity report (v1) Review of attachment 611576 [details] [diff] [review]: ----------------------------------------------------------------- This seems like more of a job for escape(). However, as far as I can tell, we don't do this same type of replacing in other fields, so what makes this particular one so special?
Attachment #611576 - Flags: review-
Changed to use encodeURIComponent instead of using replace(). escape and encodeURI will preserve '+' so that would not work for this particular issue. I am only altering the who portion of the form as email addresses should be treated differently with regard to + characters and should matter to the other form fields. CGI.pm explicitly converts '+' to spaces when decoding the form values so we have to encode before submission. dkl
Attachment #611576 - Attachment is obsolete: true
Attachment #611576 - Flags: review?(glob)
Attachment #611589 - Flags: review?(glob)
Attachment #611589 - Attachment description: Patch to allow + in email for user activity report (v1) → Patch to allow + in email for user activity report (v2)
Comment on attachment 611589 [details] [diff] [review] Patch to allow + in email for user activity report (v2) i don't think this is a bug; however if it was this isn't the right fix. it needs to not rely on javascript, and be fixed in the userselect field upstream.
Attachment #611589 - Flags: review?(glob) → review-
i suspect magnus is reporting about a problem with the url in the popup menu you get when clicking on a user, not in the report itself.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
oops, didn't mean to close this
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: user activity doesn't work when email contains plus (+) - email address needs to be encoded → When clicking on a user name in show_bug.cgi, user activity doesn't work when email contains plus (+) - email address needs to be encoded
Attachment #611589 - Attachment is obsolete: true
Attachment #612458 - Flags: review?(glob)
Comment on attachment 612458 [details] [diff] [review] Patch to allow + in email for user activity report (v3) Review of attachment 612458 [details] [diff] [review]: ----------------------------------------------------------------- ::: extensions/BMO/web/js/edituser_menu.js @@ +22,1 @@ > admin_usermenu.getItem(2).cfg.setProperty('url', 'mailto:' + escape(email)); Why does this one stay escape() when you change the other one above?
Comment on attachment 612458 [details] [diff] [review] Patch to allow + in email for user activity report (v3) Review of attachment 612458 [details] [diff] [review]: ----------------------------------------------------------------- as reed pointed out, you need to change both instances of escape() to encodeURIComponent(), please fix on commit. r=glob
Attachment #612458 - Flags: review?(glob) → review+
Thanks Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0 modified extensions/BMO/web/js/edituser_menu.js Committed revision 8120. Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2 modified extensions/BMO/web/js/edituser_menu.js Committed revision 8106. dkl
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
Component: Extensions: Other → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: