Skip to content

v0.6.0 — tolerate wrong client clocks (nginx 1.31.8)

Choose a tag to compare

@github-actions github-actions released this 05 Nov 15:55
· 15 commits to main since this release

Fixes challenge failures on devices whose clock is wrong. The browser solver used
the device clock to judge challenge expiry and to stamp per-request proofs, so a
phone clock a few minutes off could fail the check indefinitely. Built for
nginx mainline 1.31.8 and nginx stable 1.30.6.

What changed

  • Server-anchored clock. The challenge response carries the server time
    (now, additive; protocol v2 is otherwise unchanged). The solver derives its
    clock from it and the monotonic timer, and resyncs after standby, wall-clock
    jumps and about two minutes via X-Pow-Now on {endpoint}status.
  • Clock-skew diagnosis. A proof rejected only for its timestamp is answered
    with X-Pow-Reason: proof_skew and the server time; the solver adopts it and
    retries GET/HEAD once. New $pow_gate_reason values: proof_skew,
    challenge_expired, bad_token, wrong_solution.
  • User feedback. The challenge page shows a localized warning (26 languages,
    optional #pow-clock element) when the device clock differs from the server by
    60 seconds or more. The comparison uses UTC epoch time, so time zones and DST
    never trigger it.
  • Loop guard. The navigation-loop protection also works without
    sessionStorage.

pow_gate_proof_skew needs no increase for clients with wrong clocks; 5s-10s
is recommended. Custom pages that sign proofs themselves should use now /
X-Pow-Now instead of the local clock; see
protocol.md.
The solver URL is content-hashed, so browsers pick up the new solver.js
automatically.

A module must match the exact nginx version, libc and architecture of its
runtime.

Artifacts

nginx libc arch Module
1.31.8 glibc amd64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-glibc-amd64.so
1.31.8 glibc arm64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-glibc-arm64.so
1.31.8 musl amd64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-musl-amd64.so
1.31.8 musl arm64 ngx_http_pow_gate_module-0.6.0-nginx1.31.8-musl-arm64.so
1.30.6 glibc amd64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-glibc-amd64.so
1.30.6 glibc arm64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-glibc-arm64.so
1.30.6 musl amd64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-musl-amd64.so
1.30.6 musl arm64 ngx_http_pow_gate_module-0.6.0-nginx1.30.6-musl-arm64.so

Each module includes a .sig signature and .pem certificate. SHA256SUMS
covers all eight modules. The release workflow requires two independent,
byte-identical builds per module and attaches GitHub build-provenance
attestations before publishing.

Verify

Download your module, its .sig and .pem, and SHA256SUMS, then run:

module=ngx_http_pow_gate_module-0.6.0-nginx1.31.8-glibc-amd64.so
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify "$module" --repo teian/ngx_http_pow_gate
cosign verify-blob \
  --certificate "$module.pem" \
  --signature "$module.sig" \
  --certificate-identity 'https://github.com/teian/ngx_http_pow_gate/.github/workflows/release.yml@refs/tags/v0.6.0' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  "$module"