Tampermonkey / tampermonkey

Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.17k stars 416 forks source link

GM_xmlhttpRequest does not work anymore with required Windows Authentication #2157

Open msteinic opened 4 weeks ago

msteinic commented 4 weeks ago

Expected Behavior

Website with required Windows Authentication -> Windows Authentication needs to get passed via GM_xmlhttpRequest (as it worked in previous Tampermonkey Mv2, f.e. 5.1.1) to be able to get access to the requested file/website.

chrome_Mv2_direct_to_https_tpmLegacy_5 1 1

Actual Behavior

In Tampermonkey for Mv3 (f.e. v5.2.3 and latest beta 5.3.6207) the Windows Authentication apparently does not get passed to the page/file i try to access via GM_xmlhttpRequest. Due to that im getting a 401 unauthorized when trying to access the page/file which requires the Windows Authentication.

chrome_Mv3_direct_to_https_tpmLatestBeta

Specifications

Script

// ==UserScript== // @name Script // @match https://exampleWebsite.com/* // @grant GM_xmlhttpRequest // ==/UserScript==

GM_xmlhttpRequest({ method: "GET", url: "https://example.com/json/jsonData.json", responseType: "json", onload: function (result) { console.warn(result.status); } });

derjanb commented 2 weeks ago

Should be fixed at 5.3.6208 (crx|xpi in review)

Please download the crx file linked above and drag and drop it to the extensions page chrome://extensions (after you've enabled 'Developer Mode').

For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version.

msteinic commented 2 weeks ago

Tested it in several scripts. This new version fixed the bug. Thank you very much.