Closed Bug 684708 Opened 14 years ago Closed 12 years ago

Allow setting forceAllowThirdPartyCookie on requests

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peregrino, Assigned: peregrino)

References

Details

Attachments

(1 file)

In the nsIHttpChannelInternal interface there's a flag called forceAllowThirdPartyCookie that was introduced as a fix for the Bug 437174, allowing you to force sending 3rd party cookies if the user had disabled that from the preferences. The reason behind adding such flag was that some addons need to be able to send those cookies (like a gmail/facebook scanner, etc.) and as they are installed and given permission by the user they are not untrusted parties. The only way to set that flag is on the XHR object after it had been opened, so there's no way to do it now from the main.js. A WIP towards adding this can be found here https://github.com/peregrinogris/addon-sdk/commit/28a3dc
Priority: -- → P2
Attachment #560715 - Attachment is patch: false
Attachment #560715 - Attachment mime type: text/plain → text/html
Hernan, based on the pull request I think we just want to always set forceAllowThirdPartyCookies, do you want to update your patch to do that, if not I'll take it.
Yes sure! You mean removing the option to set it false, and always keeping it true?
(In reply to Hernán Rodriguez Colmeiro (:peregrino) from comment #4) > Yes sure! You mean removing the option to set it false, and always keeping > it true? Yes.
Comment on attachment 560715 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/239 Removing old pull request since Mossop was going to look into this and submit a fix.
Attachment #560715 - Flags: review?(rFobic)
Comment on attachment 560715 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/239 Updated the pull request with tests.
Attachment #560715 - Flags: review?(dtownsend+bugmail)
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/cd53dcabddd5a930b0b639325575e224a3c6b5e4 Merge pull request #239 from peregrinogris/3rdParty Bug 684708: Allow sending cookies through request when third party cookies are disabled. r=Mossop
Attachment #560715 - Flags: review?(dtownsend+bugmail) → review+
Thanks Hernan!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.15
Comment on attachment 560715 [details] Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/239 Maybe I should have run tests first...
Attachment #560715 - Flags: review+ → review-
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Maybe I should've tried the full tests suite first too. Will take a look into that log.
The failure is: error: addon-sdk: An exception occurred. NS_NOINTERFACE: Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface] undefined 118 Traceback (most recent call last): File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/timers.js", line 31, in notify callback.apply(null, args); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 286, in null timer.setTimeout(function() { onDone(self); }, 0); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 456, in null options.onDone(self); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 438, in runNextTest self.start({test: test, onDone: runNextTest}); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/deprecated/unit-test.js", line 469, in start this.test.testFunction(this); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/tests/test-request.js", line 52, in null onComplete: function(response) { File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/request.js", line 129, in null runRequest('GET', this); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/request.js", line 74, in runRequest xhr.forceAllowThirdPartyCookie(); File "resource://115aee94-fb05-4aaa-860e-48758e8496a3-at-jetpack/addon-sdk/lib/sdk/net/xhr.js", line 118, in forceAllowThirdPartyCookie this._req.channel.QueryInterface(Ci.nsIHttpChannelInternal).
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/3631e02ad819df08653775b19d30537258522888 Merge pull request #768 from peregrinogris/3rdPartyTests Bug 684708: Allow sending cookies through request when third party cookies are disabled. r=Mossop
I'm going through the list of open bugs that github robot has commented in. Is this bug fixed, Dave?
Flags: needinfo?(dtownsend+bugmail)
Looks like
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Flags: needinfo?(dtownsend+bugmail)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: