On a page served over plain HTTP (a console on a LAN address, say),
browsers leave out crypto.subtle, and sign-in fell back to the plain
PKCE method: the code verifier itself went out as the challenge, so
anyone who saw the authorization request could redeem the code. The
server advertises only S256 but still accepts plain from registered
clients.
src/lib/sha256.ts: our own SHA-256 (FIPS 180-4), used only when crypto.subtle is missing.
generateCodeChallenge always returns S256.
Tests: digests checked against Python's hashlib (empty, "abc", the
448-bit vector, non-ASCII, and 55/56/64/1000 bytes across block
boundaries) and against crypto.subtle on random input; the old
"falls back to plain" test now checks the same S256 challenge comes
out with and without crypto.subtle. Typecheck, lint, i18n:check,
all 668 tests, build and notice check pass locally. No new strings.
The server will refuse plain in a follow-up inbuxa-server PR; deploy
this console first so a console on plain HTTP keeps signing in.
On a page served over plain HTTP (a console on a LAN address, say),
browsers leave out `crypto.subtle`, and sign-in fell back to the `plain`
PKCE method: the code verifier itself went out as the challenge, so
anyone who saw the authorization request could redeem the code. The
server advertises only S256 but still accepts `plain` from registered
clients.
- `src/lib/sha256.ts`: our own SHA-256 (FIPS 180-4), used only when
`crypto.subtle` is missing.
- `generateCodeChallenge` always returns S256.
Tests: digests checked against Python's hashlib (empty, "abc", the
448-bit vector, non-ASCII, and 55/56/64/1000 bytes across block
boundaries) and against `crypto.subtle` on random input; the old
"falls back to plain" test now checks the same S256 challenge comes
out with and without `crypto.subtle`. Typecheck, lint, i18n:check,
all 668 tests, build and notice check pass locally. No new strings.
The server will refuse `plain` in a follow-up inbuxa-server PR; deploy
this console first so a console on plain HTTP keeps signing in.
Browsers leave out crypto.subtle on pages served over plain HTTP, and
sign-in then fell back to the plain PKCE method, sending the verifier
itself as the challenge. The challenge now comes from our own SHA-256
in that case, so it is always S256. The server advertises only S256,
and will refuse plain.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On a page served over plain HTTP (a console on a LAN address, say),
browsers leave out
crypto.subtle, and sign-in fell back to theplainPKCE method: the code verifier itself went out as the challenge, so
anyone who saw the authorization request could redeem the code. The
server advertises only S256 but still accepts
plainfrom registeredclients.
src/lib/sha256.ts: our own SHA-256 (FIPS 180-4), used only whencrypto.subtleis missing.generateCodeChallengealways returns S256.Tests: digests checked against Python's hashlib (empty, "abc", the
448-bit vector, non-ASCII, and 55/56/64/1000 bytes across block
boundaries) and against
crypto.subtleon random input; the old"falls back to plain" test now checks the same S256 challenge comes
out with and without
crypto.subtle. Typecheck, lint, i18n:check,all 668 tests, build and notice check pass locally. No new strings.
The server will refuse
plainin a follow-up inbuxa-server PR; deploythis console first so a console on plain HTTP keeps signing in.