🔀 Commit from Diff
Paste git diff
diff --git a/src/auth/login.js b/src/auth/login.js --- a/src/auth/login.js +++ b/src/auth/login.js @@ -10,6 +10,12 @@ function handleLogin(user, pass) { if (!user || !pass) { throw new Error('Missing credentials'); } + // Add rate limiting + if (isRateLimited(user)) { + throw new Error('Too many attempts'); + } + const token = generateToken(user); + setSession(token); return authenticate(user, pass); }
💬 Generate Message
Suggested Commit
📋