Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
… optional Custom domains saved before this release, set with WP-CLI, or saved before a salt rotation now keep loading scripts. Changing the domain still requires unfiltered_html, which is the check that stops site administrators on multisite from choosing a script origin, so the approval hash is removed. Pasted URLs are reduced to their hostname, and a rejected change or an unusable saved value is explained beside the field, where the settings page shows it. Network administrators are excluded only when "Network administrator (Super Admin)" is selected among the roles, so existing sites keep collecting their visits. With no roles selected, every logged-in user stays excluded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the custom-domain, network administrator and release schedule changes. Custom-domain changes still clear the script approval, and the integrity field's errors now use the inline messages every input shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pinned main script is the v12 release, but the bundled events script was taken from an unreleased scripts commit. Bundle src/auto-events.js from the v12 tag instead, in a directory named after the release, and derive its path from VERSION so v13 updates the version, both hashes and the directory together. v12 binds the links present when the page has loaded, so the browser test now adds its links before load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pinned mode loaded the main script from the CDN or the custom domain and, for a custom domain, waited until an administrator pasted an approved hash. It now runs dist/v12/app.js, dist/v12/custom/app.js and dist/v12/auto-events.js from the scripts v12 release archive, bundled unmodified with fixed hashes. The custom-domain build sends data to the domain it is served from, so the plugin fills in the saved domain, as the custom-domain server does, and saves the result in uploads/simpleanalytics/. If uploads is not writable, visitors get the bundled default script and administrators see a warning. This removes the hash field, its approval, and the paused state. Uninstalling removes the written scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The plugin currently executes mutable third-party analytics scripts. This adds an opt-in Pin analytics scripts setting so browsers reject unexpected script changes instead of executing them.
unfiltered_html; bind approval to the site, domain, version, and hash. Domain changes clear approval, and missing or expired approval pauses tracking with a visible notice.Dependency: depends on #58 for the existing custom-domain authorization controls. This branch includes that prerequisite commit; merge #58 first, then rebase this PR to leave only the pinning change. The branch also includes the latest main-branch fix from #60.
Validation: all 31 local Playwright/WordPress regression tests pass after rebasing onto current main, including rejection of altered main and bundled scripts, automated-event collection, custom-domain changes, invalid hashes, and permission checks. PHP/JavaScript syntax and whitespace checks pass. The official CDN script matches its published SHA-384 hash and serves CORS headers; custom-domain browser responses were mocked, so actual domain availability and CORS still require verification before enabling pinning there.
Update
Changes pushed on top of this PR, after merging the updated #58:
resources/js/pinned/v12/holdsdist/v12/app.js,dist/v12/custom/app.jsanddist/v12/auto-events.jsfrom the scripts v12 release, unmodified, with fixed hashes. The automated-events copy came from an unreleased scripts commit. Pinned scripts now follow release versions, and their directory is built fromVERSION, so v13 means three new files and three new hashes.wp-content/uploads/simpleanalytics/. The hash field, its approval and the paused state are removed. If uploads isn't writable, visitors get the bundled default script and administrators see a warning. Uninstalling removes the written scripts.The dependency on #58 still applies.
Validation: all 32 browser and WordPress regression tests pass locally on WordPress 7.1.4 with PHP 8.5, plus the regression scripts on multisite. They cover altered bundled and written scripts, data going to the custom domain, and event collection. In a browser against the live CDN, the bundled v12 scripts send pageviews and events.