Http.jsm mishandles empty / null postData

RESOLVED FIXED in mozilla25

Status

()

Toolkit
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Paenglab, Assigned: clokep)

Tracking

({regression})

Trunk
mozilla25
x86_64
Windows 8
regression
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

4 years ago
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
(Assignee)

Comment 1

4 years ago
Created attachment 777024 [details]
Log of my authentication attempt

This is a log of my authentication attempt with the keys removed.
(Assignee)

Comment 2

4 years ago
Created attachment 777505 [details] [diff] [review]
Fix v1

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)
(Assignee)

Updated

4 years ago
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+
(Assignee)

Comment 4

4 years ago
Created attachment 778151 [details] [diff] [review]
Test v1

Added a regression test.
Attachment #778151 - Flags: review?(dtownsend+bugmail)
Attachment #778151 - Flags: review?(dtownsend+bugmail) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
(Assignee)

Updated

4 years ago
Component: Instant Messaging → General
Product: Thunderbird → Toolkit
Summary: Latest Daily shows always the Authentication window for Twitter → Http.jsm mishandles empty / null postData
(Assignee)

Comment 5

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1c4f2677e2eb
https://hg.mozilla.org/integration/mozilla-inbound/rev/28c8c52f1762
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1c4f2677e2eb
https://hg.mozilla.org/mozilla-central/rev/28c8c52f1762
Status: ASSIGNED → RESOLVED
Last Resolved: 4 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.