aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/users.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/routes/users.ts b/routes/users.ts
index 34c2a655..dc007f05 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -196,9 +196,11 @@ export default {
const { confirm, password, pin, newpin } = body;
const username = body?.username?.toLowerCase().replace(/\s/g, "");
+ const reserved = ["ecash"];
const valid = /^[\p{L}\p{N}]{2,24}$/u;
if (!valid.test(username))
fail("Usernames can only have letters and numbers");
+ if (reserved.includes(username)) fail("Invalid username");
let exists;