Repository navigation
๐ก๏ธ Sentinel: [HIGH] ๋ก๊ทธ์ธ ์ฌ์ฉ์ ์ด๊ฑฐ ํ์ด๋ฐ ๊ณต๊ฒฉ ๋ฐฉ์ด #795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: developmental
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,7 +64,10 @@ export async function loginUser( | |
| const { email, password } = input | ||
|
|
||
| const user = await db.user.findUnique({ where: { email } }) | ||
| if (!user) return null | ||
| if (!user) { | ||
| await bcrypt.hash(password, 10) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ฅ Different bcrypt operations still reveal account existence For incorrect passwords, Was this helpful? React with ๐ or ๐ to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐ฉบ Stability & Availability | ๐ Major | ๐๏ธ Heavy lift ๐ Supported by static analysis๐ Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 4 'authorize\s*\(|loginUser|rate.?limit|limiter|throttle' packages/web/src --glob '*.{ts,tsx}'Repository: ContextualWisdomLab/argos Length of output: 3331 ๐ Script executed: set -euo pipefail
printf '%s\n' '--- auth.ts ---'
nl -ba packages/web/src/auth.ts | sed -n '1,90p'
printf '%s\n' '--- auth config and route candidates ---'
find packages/web/src -maxdepth 5 -type f \( -name 'route.ts' -o -name 'middleware.ts' -o -name 'auth.config.ts' -o -name 'proxy.ts' \) -print | sort
printf '%s\n' '--- login/auth route references ---'
rg -n -F --glob '*.{ts,tsx}' -e 'handlers' -e 'NextAuth' -e 'auth(' -e 'signIn(' -e 'loginUser' -e 'rateLimit' -e 'rateLimiter' -e 'throttle' -e 'limiter' packages/web/src || test "$?" -eq 1
printf '%s\n' '--- relevant route and middleware contents ---'
for f in $(find packages/web/src -maxdepth 5 -type f \( -name 'route.ts' -o -name 'middleware.ts' -o -name 'auth.config.ts' -o -name 'proxy.ts' \) -print | sort); do
case "$f" in
*auth*|*middleware*|*proxy*|*api*) printf '\n### %s\n' "$f"; nl -ba "$f";;
esac
done
printf '%s\n' '--- auth action block ---'
nl -ba packages/web/src/lib/server/auth-actions.ts | sed -n '50,90p'Repository: ContextualWisdomLab/argos Length of output: 42241 ๋ก๊ทธ์ธ ์๋ํฌ์ธํธ์ ์์ฒญ ์ ํ ๋๋ ๋์์ฑ ์ ํ์ ์ ์ฉํ์ธ์.
๐ค Prompt for AI Agents |
||
| return null | ||
| } | ||
|
|
||
| const valid = await bcrypt.compare(password, user.passwordHash) | ||
| if (!valid) return null | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ฅ Unknown-email logins accept unbounded passwords
For unknown emails,
bcrypt.hashprocesses any string password, including oversized inputs. authorize never applies the shared password limit, leaving login open to resource exhaustion.Was this helpful? React with ๐ or ๐ to provide feedback.