Skip to content
This repository

GM doesn't pass cookies during script install #1359

Closed
BehoDouble opened this Issue May 29, 2011 · 5 comments

3 participants

BehoDouble arantius Mike Medley
BehoDouble

Firefox 4.0.1
Greasemonkey 0.9.3

I am not able to fetch a script on a website where only logged users have access to scripts.
It seems that Greasemonkey does not send the Cookie HTTP Header used by the website.

Mike Medley

Please change this title to something more clear like: "GM doesn't pass cookies during script install".

As for the actual topic of the issue, since Firefox handles xhr cookies automatically I don't understand how this could happen. I tested this with Tamper Data and confirmed that cookies were indeed sent with the install request. If it fails to send the cookies sometimes then this would be an Moz bug. Please install the Tamper Data extension and confirm that the cookies are not being sent to make sure that this isn't the result of a faulty server-side script.

BehoDouble

When I click on a .user.js link,
request headers with the Tamper Data extension:

** Greasemonkey disabled **
Host=[website_url]
User-Agent=Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language=fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding=gzip, deflate
Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive=115
Connection=keep-alive
Referer=[referer_url]
Cookie=60gp=R152027072; tz=Europe%2FParis; 60gp_download=R3588672987; PHPSESSID=7413b1163a4ab15efbd084c9cac23165

** Greasemonkey enabled **
Host=[website_url]
User-Agent=Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language=fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding=gzip, deflate
Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive=115
Connection=keep-alive

BehoDouble

Ok I found the problem:
Options --> Privacy --> Accept third-party cookies
When you don't accept third-party cookies the script install does not pass cookie.
But I wonder if it's a Greasemonkey bug, a Firefox bug or normal behaviour.

arantius
Collaborator

I assume this is some sort of private site that you can't share with us?

Without the specific page and script in question it's hard to be sure what's going on.

arantius
Collaborator

NVM, was easier to reproduce than I thought.

arantius arantius closed this in c71d4c1 June 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.