Accept only S256 PKCE challenges #205

Merged
jcoffey-dev merged 1 commits from fix/pkce-s256-only into main 2026-10-18 22:21:28 +00:00
Owner

The server advertises only S256 in its metadata but still accepted
code_challenge_method=plain, and a challenge sent with no method at
all (which RFC 7636 reads as plain). With plain the challenge is
the verifier itself, so anyone who saw the authorization request could
redeem the code.

The authorization endpoint now accepts a challenge only with
code_challenge_method=S256; plain or a missing method is refused
with "Unsupported PKCE code_challenge_method: use S256.". Registered
clients that send no challenge at all are unchanged, and codes issued
with plain before the upgrade still verify.

Deploy order: inbuxa-admin #112 must be live first. Until it is, a
console served over plain HTTP falls back to plain and would no
longer sign in. The webmail already sends S256 only.

Tests: system::system_tests adds OIDC cases for plain and for a
missing method, both refused; the suite passes. Fork checks clean.

The server advertises only S256 in its metadata but still accepted `code_challenge_method=plain`, and a challenge sent with no method at all (which RFC 7636 reads as `plain`). With `plain` the challenge is the verifier itself, so anyone who saw the authorization request could redeem the code. The authorization endpoint now accepts a challenge only with `code_challenge_method=S256`; `plain` or a missing method is refused with "Unsupported PKCE code_challenge_method: use S256.". Registered clients that send no challenge at all are unchanged, and codes issued with `plain` before the upgrade still verify. **Deploy order:** inbuxa-admin #112 must be live first. Until it is, a console served over plain HTTP falls back to `plain` and would no longer sign in. The webmail already sends S256 only. Tests: `system::system_tests` adds OIDC cases for `plain` and for a missing method, both refused; the suite passes. Fork checks clean.
jcoffey-dev added 1 commit 2026-10-18 21:53:28 +00:00
Accept only S256 PKCE challenges
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 20m46s
9c856d3c66
The authorization endpoint took the plain method, and assumed it when a
challenge came without a method (RFC 7636's default), for every client
but stateless ones, though the metadata lists only S256. With plain the
challenge is the verifier, so it protects nothing. Codes issued with
plain before an upgrade still verify.
jcoffey-dev merged commit 0cd561763f into main 2026-10-18 22:21:28 +00:00
jcoffey-dev deleted branch fix/pkce-s256-only 2026-10-18 22:21:29 +00:00
Sign in to join this conversation.