mirror of
https://github.com/PretendoNetwork/miiverse-api.git
synced 2026-04-25 07:36:49 -05:00
patch: reject non-service tokens
This commit is contained in:
parent
052da9f4e5
commit
97c2612982
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user