nuke/lib
Xe Iaso fb3637df95
feat(metarefresh): randomly use the Refresh header (#1133)
* feat(lib/challenge): expose ResponseWriter to challenge issuers

Signed-off-by: Xe Iaso <me@xeiaso.net>

* feat(metarefresh): randomly use the Refresh header

There are several ways to trigger an automatic refresh without
JavaScript. One of them is the "meta refresh" method[1], but the other
is with the Refresh header[2]. Both are semantically identical and
supported with browsers as old as Chrome version 1.

Given that they are basically the same thing, this patch makes Anubis
randomly select between them by using the challenge random data's first
character. This will fire about 50% of the time.

I expect this to have no impact. If this works out fine, then I will
implement some kind of fallback logic for the fast challenge such that
admins can opt into allowing clients with a no-js configuration to pass
the fast challenge. This needs to bake in the oven though.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta/http-equiv
[2]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Refresh

Signed-off-by: Xe Iaso <me@xeiaso.net>

* docs: update CHANGELOG

Signed-off-by: Xe Iaso <me@xeiaso.net>

* feat(metarefresh): simplify random logic

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <me@xeiaso.net>
Signed-off-by: Xe Iaso <xe.iaso@techaro.lol>
2025-09-16 17:32:13 -04:00
..
challenge feat(metarefresh): randomly use the Refresh header (#1133) 2025-09-16 17:32:13 -04:00
localization Update nl.json removeing literal translated 'cookie' (koekje) with 'cookie' (#1126) 2025-09-16 07:53:30 -04:00
policy feat(expressions): add contentLength to bot expressions (#1120) 2025-09-15 01:41:45 +00:00
store feat(store/bbolt): implement actor pattern (#1107) 2025-09-12 18:35:22 +00:00
testdata fix(web): embed challenge ID in pass-challenge invocations (#944) 2025-08-04 18:49:19 +00:00
thoth chore: expose thoth in lib (#911) 2025-07-25 10:58:30 -04:00
anubis.go feat(lib): Add option for adding difficulty field to JWT claims (#1063) 2025-09-11 13:50:33 +00:00
anubis_test.go feat: fallback to SameSite Lax mode if cookie is not secure (#1105) 2025-09-13 10:56:54 +00:00
config.go feat: fallback to SameSite Lax mode if cookie is not secure (#1105) 2025-09-13 10:56:54 +00:00
config_test.go chore: expose thoth in lib (#911) 2025-07-25 10:58:30 -04:00
http.go feat(metarefresh): randomly use the Refresh header (#1133) 2025-09-16 17:32:13 -04:00
http_test.go feat: support HTTP redirect for forward authentication middleware in Traefik (#368) 2025-08-12 20:59:45 -04:00