Repository navigation
Recover scanner reports on cached WordPress pages - #157
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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