Skip to content

Recover scanner reports on cached WordPress pages - #157

Merged
cport1 merged 1 commit into
mainfrom
fix/cached-scanner-nonce
Nov 22, 2026
Merged

cport1 merged 1 commit into
mainfrom
fix/cached-scanner-nonce

Conversation

@cport1

@cport1 cport1 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Refs WebDecoy/app#1943 and WebDecoy/app#1955

Recover browser reports from cached HTML with an expired scanner nonce. Same-origin clients with fetch keepalive support retry once after the report endpoint explicitly rejects the nonce. The new nonce endpoint accepts POST from the configured AJAX origin and honors scanner settings. Existing report validation, rate limits, and forwarding still apply to the retried request.

Add the PHP coverage limit and the supported cache or edge-sensor options to Scanner settings and the README.

Verified with WordPress 7.1, the WordPress.org WebDecoy 2.16.0 ZIP, and an isolated Nginx full-page cache. Nginx returned a cache HIT with the original PHP marker. The released plugin returned 403 and saved zero rows after the fixture nonce expired. With the change, the refreshed report returned 200 and saved one local detection. GET, a different origin, and a disabled scanner returned 403 from the renewal endpoint.

All 306 PHP tests and five JavaScript transport tests passed. The same installed replay passed with WP Super Cache 3.1.5 in Simple mode. Its cache hit served the expired page without running the WebDecoy WordPress hook. Released 2.16.0 returned 403 and saved zero rows. The candidate renewed the nonce and saved one report. WP Super Cache

@cport1
cport1 merged commit a1eb27a into main Nov 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant