mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 14:45:11 -05:00
CodeQL #599 (js/insufficient-password-hash, CWE-916) flagged the SHA-1 the server computed for PASSWORD_CHECK_PWNED. That digest is not password storage - accounts-password keeps passwords with bcrypt - and it is never stored or logged: Have I Been Pwned's range API is keyed by SHA-1, its first 5 hex digits are the question and the rest is compared in memory. A slow hash cannot be used, because the service could not match it. The browser and the server now compute it with one implementation, breachLookupDigest in models/lib/passwordPolicy.js, which says what it is and is not; the server no longer hashes a password with a hash of its own, and a digest that cannot be computed lets the password through. Tests pin that the digest is SHA-1 for ASCII and UTF-8, that it reaches only the lookup and the comparison, and that nothing in WeKan hashes a password-named value with a fast hash. Unreleased hardening, so no Hall of Fame entry: docs/Security/Password-Breach-Check-Digest-2026-10-31.md. Thanks to GitHub CodeQL and xet7 !