Skip to content

Preserve IP exclusions on their first save - #44

Merged
adriaandotcom merged 2 commits into
simpleanalytics:mainfrom
jdevalk:codex/fix-ip-sanitization
Sep 15, 2026
Merged

adriaandotcom merged 2 commits into
simpleanalytics:mainfrom
jdevalk:codex/fix-ip-sanitization

Conversation

@jdevalk

@jdevalk jdevalk commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Preserve valid IP addresses when WordPress sanitizes a newly created option twice. The sanitizer now accepts both textarea strings and arrays, filters malformed elements before trimming, and retains deduplication and validation.

Fixes #41.

Validation: WordPress regression tests reproduce the first-save failure before the fix and pass afterward, including repeated sanitization, malformed input, IPv4 and IPv6. Tests use a temporary options table and run through the existing Playwright CI command.

Combined validation: all six proposed fixes were applied to a local integration branch; all 23 browser and WordPress regression tests, the asset build, PHP syntax checks and diff checks passed. GitHub workflows currently report action_required for these fork pull requests.

@adriaandotcom
adriaandotcom merged commit 9543237 into simpleanalytics:main Sep 15, 2026
7 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.

First save of IP exclusions discards addresses when the option is missing

2 participants