Closed Bug 373958 Opened 17 years ago Closed 17 years ago

Bootstrap weird characters check should send error response header

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
4.x (triaged)

People

(Reporter: wenzel, Assigned: wenzel)

References

Details

Attachments

(1 file)

In bootstrap.php, a check for weird characters in the request URL is performed. When something unusual is found, the request is currently forwarded to the front page.

This can lead to strange results, when Firefox's XPI installer tries downloading a file (it fetches the front page and tries to handle it as a valid file). Instead, such an a failed attempt should return an HTTP error code, possibly "400 Bad Request".
Depends on: 372302
Severity: normal → minor
Target Milestone: --- → 3.x (triaged)
Here's a fix for the issue. Does that seem okay?
Assignee: nobody → fwenzel
Status: NEW → ASSIGNED
Attachment #274161 - Flags: review?
Attachment #274161 - Flags: review? → review?(shaver)
Comment on attachment 274161 [details] [diff] [review]
Send "bad request" response instead of forwarding to front page

Wil, do you have time to review this?

Also, do you think that 400 Bad Request is the right error to throw here?
Attachment #274161 - Flags: review?(shaver) → review?(clouserw)
Comment on attachment 274161 [details] [diff] [review]
Send "bad request" response instead of forwarding to front page

works for me
Attachment #274161 - Flags: review?(clouserw) → review+
This is in the trunk, r6467, and will go online with the next push. Thanks.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: