Closed Bug 927457 Opened 11 years ago Closed 11 years ago

processTokenResponse fails to handle 401 response correctly

Categories

(Cloud Services :: Firefox: Common, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: markh, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Assign literal to error.message (obsolete) — Splinter Review
Bug 783437 tweaked the error handling support in processTokenResponse in services/common/tokenserverclient.js.  In particular, it attempts to do:

        error.message("Authentication failed.");

when it almost certainly means to do:

        error.message = "Authentication failed.";

Requesting review from :gps as he landed the initial code; CC rnewman and rfkelly as reviewers - please shuffle the request around as appropriate.
Attachment #817900 - Flags: review?(gps)
Comment on attachment 817900 [details] [diff] [review]
Assign literal to error.message

Review of attachment 817900 [details] [diff] [review]:
-----------------------------------------------------------------

Oh my. That's a pretty nasty bug and lapse in test coverage. If you are actually relying on this, we definitely need a test case for the 401 case. New patch or followup bug, please.
Attachment #817900 - Flags: review?(gps) → review+
(In reply to Gregory Szorc [:gps] from comment #1)
> Oh my. That's a pretty nasty bug and lapse in test coverage. If you are
> actually relying on this, we definitely need a test case for the 401 case.
> New patch or followup bug, please.

Thanks.  FTR, we aren't actually relying on it, but just hit it while playing with an fxaccounts-based sync impl.
Attachment #817900 - Attachment is obsolete: true
Attachment #818147 - Flags: review?(gps)
Comment on attachment 818147 [details] [diff] [review]
Now includes a test for handling 401s

Review of attachment 818147 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for writing the test!
Attachment #818147 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/5a58e6669962
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: