Closed Bug 894367 Opened 9 years ago Closed 9 years ago

Http.jsm mishandles empty / null postData

Categories

(Toolkit :: General, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: Paenglab, Assigned: clokep)

References

Details

(Keywords: regression)

Attachments

(3 files)

Since 20130714 Daily shows the authentication window for Twitter. After entering the correct password the authentication reappears.

In console I get:

Tue Jul 16 2013 14:20:26
Error: 401 - {"errors":[{"message":"Could not authenticate you","code":32}]}
Source file: resource://gre/modules/Http.jsm
Line: 75
 ----------
Tue Jul 16 2013 14:20:26
Error: 401 - {"errors":[{"message":"Could not authenticate you","code":32}]}
Source file: resource://gre/components/twitter.js
Line: 593
Source code:
prpl-twitter

Last good version is 20130712

I suppose the issue has something to do with the http.jsm to toolkit bug 884319
This is a log of my authentication attempt with the keys removed.
Attached patch Fix v1Splinter Review
I slightly changed the behavior of checking for post data when switching Http.jsm to use an options object, we should only consider post data if the field is defined AND the field has data (i.e. is not null, undefined, empty, etc.) This matches the previous behavior.
Assignee: nobody → clokep
Status: NEW → ASSIGNED
Attachment #777505 - Flags: review?(dtownsend+bugmail)
Blocks: 884319
Comment on attachment 777505 [details] [diff] [review]
Fix v1

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

Test please
Attachment #777505 - Flags: review?(dtownsend+bugmail) → review+
Attached patch Test v1Splinter Review
Added a regression test.
Attachment #778151 - Flags: review?(dtownsend+bugmail)
Attachment #778151 - Flags: review?(dtownsend+bugmail) → review+
Keywords: checkin-needed
Component: Instant Messaging → General
Product: Thunderbird → Toolkit
Summary: Latest Daily shows always the Authentication window for Twitter → Http.jsm mishandles empty / null postData
https://hg.mozilla.org/mozilla-central/rev/1c4f2677e2eb
https://hg.mozilla.org/mozilla-central/rev/28c8c52f1762
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.