Created
May 1, 2017 08:12
-
-
Save janekptacijarabaci/837d5d816cb247309daeaba63c388d27 to your computer and use it in GitHub Desktop.
Greasemonkey issue #2235: GM_xmlhttpRequest overwrite cookie in headers parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Greasemonkey - issue - 2235 | |
// @include http://www.html-kit.com/tools/cookietester/ | |
// @noframes | |
// @grant GM_log | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== | |
var anonymous = false; | |
if (confirm("Anonymous?")) { | |
anonymous = true; | |
} | |
GM_xmlhttpRequest({ | |
"url": "http://www.html-kit.com/tools/cookietester/", | |
"method": "GET", | |
// "mozAnon": anonymous, | |
"anonymous": anonymous, | |
"headers": { | |
"cookie": "name1=value1; name2=value2;" // + " " + document.cookie // cookies not HttpOnly | |
}, | |
"onload": function (response) { | |
alert(response.responseText); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment