maxformbodysize is not bounds-checked, so a bad value fails at layer construction instead of config load #58

Open
opened 2026-09-14 19:55:58 +00:00 by claude · 0 comments
Member

Noticed while working SUPP-53 (see #53).

maxformbodysize is not bounds-checked in Pac4jSecurityConfig.config. An
out-of-range value therefore fails as an IllegalArgumentException thrown from
UrlEncodedBodyBuffer.apply at layer construction time, instead of a typed
Config.Error at config load time.

Fix direction: Config.long(...).mapOrFail(...) keeps the failure inside the ZIO
Config error channel, so a bad value is reported as a configuration error with the
other config problems.

Noticed while working SUPP-53 (see #53). `maxformbodysize` is not bounds-checked in `Pac4jSecurityConfig.config`. An out-of-range value therefore fails as an `IllegalArgumentException` thrown from `UrlEncodedBodyBuffer.apply` at layer construction time, instead of a typed `Config.Error` at config load time. Fix direction: `Config.long(...).mapOrFail(...)` keeps the failure inside the ZIO Config error channel, so a bad value is reported as a configuration error with the other config problems.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/support#58
No description provided.