cswork / OAOpen practice workspace

AmazonOA #2

VibeShop: Change Password

Estimated MediumNon-algorithmicStatement and editorial — judging is being prepared

Topics (AI-labelled)StringsHashingSimulation

修复 password change 端点的安全 bug:

  • 当前 password 没校验, 直接允许换
  • 新密码绕过强度校验 (需 ≥8 chars + 大写 + 小写 + 数字 + 特殊字符)
  • 没发 4-digit 验证码就允许换
  • 3 次失败应锁 60 秒

涉及端点:

  • POST /api/auth/change-password/initiate
  • POST /api/auth/change-password/verify
  • POST /api/auth/change-password/update

考点: bcrypt password verification, regex strength check, in-memory rate limit + 临时锁, JWT auth middleware.


Editorial

Loading solution…