$ claude "修复 login 的密码比对 bug"
# Claude is thinking ...
▸ 扫描 repo · 4 文件已读 · 132 LOC
▸ 定位问题: auth.py L42 使用了明文比对
# auth.py
def login(user, pwd):
- if user.password == pwd:
+ if bcrypt.checkpw(pwd.encode(), user.pwd_hash):
return True
✓ 运行 pytest · 12 passed · 1.2s
✓ 写入 commit: "auth: use bcrypt for password check"
$