Merge pull request #334 from PretendoNetwork/fix/#333
Some checks are pending
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Waiting to run
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Waiting to run

Throw `0114` for users under 13
This commit is contained in:
Jonathan Barrow
2026-05-11 19:45:50 -04:00
committed by GitHub
2 changed files with 35 additions and 0 deletions

View File

@@ -118,6 +118,22 @@ router.post('/', async (request: express.Request, response: express.Response): P
}
}
if (age < 13) {
// * Wii U firmware 5.5.6 changed NNID setup to block setup of new accounts if the users age is
// * under 13, telling parents that they MUST call Nintendo to create the account, and we trusted
// * that users would be on these firmwares. Lower firmwares won't have this though, and will use
// * the old "COPPA approval" system
// *
// * Just block it all the time though, we don't want to deal with this headache
response.status(400).json({
app: 'api',
status: 400,
error: 'Must be 13 or older to use these services.'
});
return;
}
if (!email || email === '') {
response.status(400).json({
app: 'api',

View File

@@ -89,6 +89,25 @@ router.post('/', ratelimit, deviceCertificateMiddleware, async (request: express
}
}
if (age < 13) {
// * Wii U firmware 5.5.6 changed NNID setup to block setup of new accounts if the users age is
// * under 13, telling parents that they MUST call Nintendo to create the account, and we trusted
// * that users would be on these firmwares. Lower firmwares won't have this though, and will use
// * the old "COPPA approval" system
// *
// * Just block it all the time though, we don't want to deal with this headache
response.status(400).send(xmlbuilder.create({
errors: {
error: {
code: '0114',
message: 'COPPA approval is not complete'
}
}
}).end());
return;
}
const userExists = await doesPNIDExist(person.user_id);
if (userExists) {