From cc4ded2b7814e9a9b223c3a286b9087bd5dcf13b Mon Sep 17 00:00:00 2001 From: Jonathan Barrow Date: Fri, 8 May 2026 14:44:20 -0400 Subject: [PATCH] fix(nnas): throw 0114 for bad birthdays --- src/services/api/routes/v1/register.ts | 16 ++++++++++++++++ src/services/nnas/routes/people.ts | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/services/api/routes/v1/register.ts b/src/services/api/routes/v1/register.ts index fcc3ce3..17be1fc 100644 --- a/src/services/api/routes/v1/register.ts +++ b/src/services/api/routes/v1/register.ts @@ -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', diff --git a/src/services/nnas/routes/people.ts b/src/services/nnas/routes/people.ts index 0909a9c..c8ef611 100644 --- a/src/services/nnas/routes/people.ts +++ b/src/services/nnas/routes/people.ts @@ -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) {