diff options
| -rw-r--r-- | lib/register.ts | 1 | ||||
| -rw-r--r-- | routes/payments.ts | 2 | ||||
| -rw-r--r-- | routes/users.ts | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/lib/register.ts b/lib/register.ts index 8b893d6c..a74ea640 100644 --- a/lib/register.ts +++ b/lib/register.ts @@ -21,6 +21,7 @@ export default async (user, ip) => { if (!valid.test(username)) fail("Usernames can only have letters and numbers"); if (reserved.includes(username)) fail("Invalid username"); + if (username.includes("undefined")) fail("Invalid username"); const id = v4(); user.id = id; diff --git a/routes/payments.ts b/routes/payments.ts index ea968548..d4d83bd2 100644 --- a/routes/payments.ts +++ b/routes/payments.ts @@ -466,7 +466,7 @@ export default { if (!p) { const invoice = await getInvoice(address); if (!hot && aid !== invoice?.aid) continue; - if (sats(amount) < 500) continue; + if (sats(amount) < 300) continue; await credit({ hash: address, amount: sats(amount), diff --git a/routes/users.ts b/routes/users.ts index 7c6d0938..bd2ffb42 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -201,6 +201,7 @@ export default { if (!valid.test(username)) fail("Usernames can only have letters and numbers"); if (reserved.includes(username)) fail("Invalid username"); + if (username?.includes("undefined")) fail("Invalid username"); let exists; |
