fix(nnas): throw 0114 for bad birthdays

This commit is contained in:
Jonathan Barrow
2026-05-08 14:44:20 -04:00
parent e2e458bcdb
commit cc4ded2b78
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) {