Closed Bug 436994 Opened 17 years ago Closed 16 years ago

CSRF error message should return HTTP code 400, not 200

Categories

(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: clouserw, Assigned: wenzel)

Details

Attachments

(2 files)

From bug 435450, the feature list javascript should check the return response from the server. To reproduce: 1) Go to the editor's feature list and add a feature 2) Tamper with the POST request and make the sessioncheck variable invalid Expected results: 1) A 400 response from the server and an appropriate error Actual results: 1) A 200 response from the server and it's added to the list. However, it's only added client side and refreshing the page doesn't show the add-on in the list.
I think the "sessionCheck check" does not set the HTTP response code correctly when receiving an incorrect sessioncheck ID. When I wrote the code, I tried putting incorrect values into the form and when the "add feature" code returns an error, the AJAX javascript honors this correctly, so I am quite sure the CSRF check is at fault here.
Summary: Feature list shouldn't add with bad sessioncheck → CSRF error message should return HTTP code 400, not 200
Attached patch Patch, rev. 1Splinter Review
Just closing out a few old bugs and this one is a one-liner.
Assignee: nobody → fwenzel
Status: NEW → ASSIGNED
Attachment #372027 - Flags: review?(clouserw)
Target Milestone: --- → 5.0.5
Attachment #372027 - Flags: review?(clouserw) → review+
r24391. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: push-needed
Resolution: --- → FIXED
As the screenshot in comment 4 shows, I get a status code/error of 400 returned. Verified FIXED
Status: RESOLVED → VERIFIED
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: