Skip to content

Instantly share code, notes, and snippets.

@asahilina
Last active November 27, 2025 18:42
Show Gist options
  • Select an option

  • Save asahilina/31dd6bf3cde26a51e0fc1414e1abe730 to your computer and use it in GitHub Desktop.

Select an option

Save asahilina/31dd6bf3cde26a51e0fc1414e1abe730 to your computer and use it in GitHub Desktop.
Asahi Linux PayPal Block Fix
// ==UserScript==
// @name PayPal Asahi Linux Fix
// @version v1.0
// @description Fix PayPal banning Asahi Linux
// @author Asahi Lina
// @match https://www.paypal.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=paypal.com
// @grant unsafeWindow
// ==/UserScript==
// Alternative: Instead of this script, you can also just spoof a Mac OS X / Safari user agent.
// Then "Apple M1" is allowed.
(function() {
'use strict';
(function(getParameter) {
unsafeWindow.WebGLRenderingContext.prototype.getParameter = function() {
let val = getParameter.apply(this, arguments);
if (arguments[0] == WebGLRenderingContext.RENDERER) {
// PayPal blocks Linux users with a GPU renderer containing "Apple M1". Yes, really.
let newval = "Possibly an Apple, possibly an M1";
console.log("Spoofed GPU renderer", val, "->", newval);
return newval;
}
return val;
};
})(unsafeWindow.WebGLRenderingContext.prototype.getParameter);
})();
@ijsbol
Copy link

ijsbol commented Nov 18, 2025

can someone explain like i'm 5 why paypal is doing this to begin with? does asahi have something that fucks paypal? i'm so confused

@mid-kid
Copy link

mid-kid commented Nov 18, 2025

@ijsbol In my uneducated guess I imagine someone thought filtering "impossible" combinations of browser metadata would help against bots/fraud, and they weren't aware of linux being able to run on M1 graphics.

@ijsbol
Copy link

ijsbol commented Nov 18, 2025

@ijsbol In my uneducated guess I imagine someone thought filtering "impossible" combinations of browser metadata would help against bots/fraud, and they weren't aware of linux being able to run on M1 graphics.

this makes sense. it's either this or paypal specifically hates asahi lol

@whalesalad
Copy link

guaranteed they have some kid of naive mapping code that is gathering all these data points: os, cpu, gpu, etc... and then fitting them against a known matrix of "valid combinations"

this is probably just overly rigid and overly specific logic in their system. still a bug ... but probably not malicious or devious.

@scudo005
Copy link

scudo005 commented Nov 18, 2025

@ijsbol In my uneducated guess I imagine someone thought filtering "impossible" combinations of browser metadata would help against bots/fraud, and they weren't aware of linux being able to run on M1 graphics.

this makes sense. it's either this or paypal specifically hates asahi lol

I'm not even sure that PayPal knows about Asahi, and if they do, I don't think they care about Asahi users. Which is understandable, even if debatable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment