1
0
mirror of https://github.com/janeczku/calibre-web synced 2026-06-02 02:32:11 +00:00
Files
calibre-web/cps
Rafik Farhad 36a7ff19bc Fix AttributeError on unauthenticated OPDS requests
request_username() is used as flask-limiter's key_func for the OPDS
blueprint. The limiter evaluates key_func in a before_request handler,
before the route's auth decorator runs. When no Authorization header is
present, request.authorization is None, causing an AttributeError and
a 500 response instead of the expected 401.

Guard against None so unauthenticated requests fall back to an empty
string key, allowing the auth decorator to handle the 401 correctly.

Fixes #3592

Disclaimer: AI assisted—humans supervised.
2026-02-21 16:54:14 -06:00
..
2024-11-04 21:20:34 +01:00
2025-11-22 15:06:40 +01:00
2025-04-12 03:59:32 +08:00
2026-02-14 11:30:50 +01:00
2026-02-14 11:30:50 +01:00
2024-11-23 15:46:20 +01:00
2022-05-22 12:49:00 +01:00
2024-09-07 20:07:45 +02:00
2022-05-21 21:52:59 +01:00
2025-03-23 09:18:48 +01:00
2026-01-31 12:31:44 +01:00
2024-06-20 19:12:46 +02:00
2026-02-14 11:30:50 +01:00
2023-01-21 15:23:18 +01:00
2024-07-02 20:53:08 +02:00
2024-11-23 15:46:20 +01:00
2026-02-18 19:11:38 +01:00
2024-12-13 18:03:14 +01:00
2025-03-23 15:12:06 +01:00
2024-07-29 20:08:17 +02:00
2024-07-15 19:38:54 +02:00
2025-03-30 12:03:12 +02:00
2025-12-20 13:22:20 +01:00
2025-11-22 15:06:40 +01:00
2026-01-07 20:35:26 +01:00
2025-03-30 12:03:12 +02:00
2024-11-11 18:46:07 +01:00
2026-02-18 18:59:29 +01:00
2026-02-18 18:59:29 +01:00