Browse Source
Several handlers pass request-controlled values to the database and .expect() the result, so a value the database rejects (for example a string containing a NUL byte, which PostgreSQL refuses in text columns) turns a normal error into a panic: - POST /api/ciphers/<cipher_id>/attachment/v2 with a NUL byte in the attachment key or file name - POST/PUT /api/ciphers/move with a NUL byte in an ids entry (IDs from a JSON body are not validated the way UuidFromParam validates path params) On the default unwinding builds Rocket catches this and returns 500; on builds compiled with panic=abort it terminates the process. Any authenticated user can trigger it, including on their own cipher. Make the attachment saves propagate the error (the enclosing functions already return Result), and validate the move handler's cipher IDs up front, so both return a normal error response instead of panicking. Co-authored-by: Voucher Security <security@vouchersecurity.com>pull/7915/merge
committed by
GitHub
1 changed files with 13 additions and 3 deletions
Loading…
Reference in new issue