Repository navigation
Security
- Harden request logging — a malformed URL escape or a null byte in the request URL can no longer crash the process via the request logger.
- Reject unsafe $regex patterns in the query parameter to prevent regex denial-of-service; safe patterns continue to work.
- Harden login against account enumeration — the same error is returned for an unknown email and a wrong password, with a constant-time password comparison (no timing oracle).
- Validate collection ids as safe identifiers on create/update, preventing injection via collection names used as SQL table and storage directory names.
Behavior changes
- Login now returns 401 {"error":"Invalid email or password"} for both an unknown email and a wrong password (previously 400 "No found with this email." for an unknown email and 401 "Incorrect password" for a wrong password). Update any client that branches on the old status or message.
- Creating or updating a collection whose id is not ^[a-zA-Z][a-zA-Z0-9_]*$ now returns 400 invalid collection id.
Dependencies
- Added safe-regex@^2.1.1.
Full Changelog: 3.0.1...3.0.2