patch: reject non-service tokens

This commit is contained in:
Jonathan Barrow 2024-02-04 14:04:59 -05:00
parent 052da9f4e5
commit 97c2612982
No known key found for this signature in database
GPG Key ID: E86E9FE9049C741F

View File

@ -56,6 +56,11 @@ export function getPIDFromServiceToken(token: string): number {
const unpackedToken = unpackToken(decryptedToken);
// * Only allow token types 1 (Wii U) and 2 (3DS)
if (unpackedToken.system_type !== 1 && unpackedToken.system_type !== 2) {
return 0;
}
return unpackedToken.pid;
} catch (e) {
console.error(e);