diff options
| author | Adam Soltys <[email protected]> | 2026-01-29 06:43:51 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-01-29 06:43:51 +0000 |
| commit | d3ada1af0023374b43f0cd8a5863e6f992d9bb92 (patch) | |
| tree | 6cc7c274a227e3fd3d5726de109db874c11364a4 | |
| parent | 6136f640456959e6471cbf7d41f6a44eed9671f1 (diff) | |
| download | coinos-server-d3ada1af0023374b43f0cd8a5863e6f992d9bb92.tar.gz coinos-server-d3ada1af0023374b43f0cd8a5863e6f992d9bb92.zip | |
check username
| -rw-r--r-- | routes/users.ts | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/routes/users.ts b/routes/users.ts index a00c16fe..ed9d6b76 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -41,7 +41,7 @@ const verifyRecaptcha = async (response, req?) => { } const { username } = req.body; - if ( + if (username && await db.sIsMember("nocaptcha", username.toLowerCase().replace(/\s/g, "")) ) return true; @@ -475,16 +475,6 @@ export default { } const { username } = user; - if ( - await db.sIsMember( - "compromised", - username.replace(/\s/g, "").toLowerCase(), - ) - ) { - warn("compromised nostr auth attempt"); - fail("unauthorized"); - } - l("nostr login", username, ip); const payload = { id: user.id }; |
