Skip to content

Releases

CookieKit 1.2.1 (security fix)

Choose a tag to compare

@domenicosacchi domenicosacchi released this 13 Nov 21:08

Security

  • Iframe placeholders (.ckit-iframe-placeholder) only load http: and https: URLs. Post content from users without the unfiltered_html capability (such as Authors and Contributors) could include a placeholder whose data-ckit-iframe-src held a javascript: URL. That URL ran in the site's origin when the iframe was unblocked, either automatically for visitors who had already consented or with the "Load once" button.

Fixed

  • Consents were not written to the log from cached pages once the REST nonce in the cached HTML expired: WordPress answered 403 rest_cookie_invalid_nonce even for logged-out visitors. The banner no longer sends a nonce to the public POST /cookiekit/v1/consent endpoint.
  • The preferences modal always listed the consent cookie as lasting "6 months", whatever the re-prompt setting. It now shows the configured number of days; the default (183 days) still shows "6 months".
  • The Settings page showed 180 as the re-prompt default (field fallback and help text) instead of 183.
  • Scanner HTML enrichment no longer treats the page as empty when a regular expression fails on a very large page.

Install: download the zip below and upload it from Plugins → Add New → Upload Plugin in WordPress. Existing installs: update to this version as soon as possible.

CookieKit 1.2.0

Choose a tag to compare

@domenicosacchi domenicosacchi released this 13 Nov 20:23

First public release on GitHub.

Changed

  • Default re-prompt interval raised from 180 to 183 days (about six months). Sites that already saved 180 keep their setting.

Security

  • Settings are now sanitized: allowed values for selects, hex colors, numeric ranges, URLs, and a policy version of at most 20 characters.
  • REST POST /cookiekit/v1/consent: consent_uuid must be a valid UUID, only existing category IDs are stored, and page_url and language are clamped to their column sizes.
  • REST POST /cookiekit/v1/snapshot and scanner: only string cookie names are accepted. Pages are fetched only on the site's own host, with wp_safe_remote_get() (no server-side requests to arbitrary URLs). SSL verification follows core's https_local_ssl_verify filter. The scanner uses a neutral user agent.
  • CSV export: built with fputcsv() and protected against spreadsheet formula injection; export responses send no-cache headers.
  • Admin: escaped the logo preview URL and vendor row indexes; external links use rel="noopener noreferrer"; POST arrays are type-checked; only known text keys are saved; invalid vendor regex patterns are dropped.
  • Browser scan overlay: error messages are rendered as text, not HTML.
  • The vendor list (regex patterns) is no longer printed on every front-end page.

Fixed

  • Unchecking a checkbox in Settings had no effect: the unchecked key was dropped and the default (enabled) applied again. Checkboxes now show the value actually in use and store 0 when unchecked.
  • Google Consent Mode "update" was never sent when auto-blocking was disabled. The consent script now always loads.
  • An expired consent, or one given under an older policy version, could still send "granted" Consent Mode signals on page load.
  • The scanner's HTML enrichment listed every configured vendor's cookies on every page, because it matched the plugin's own configuration and Consent Mode snippet.
  • Admin-only WordPress cookies (wp-settings-*, wordpress_test_cookie) were saved by the browser scan.
  • The browser scan stopped with a no_cookies error on a page without first-party cookies; such a page is now a valid result.
  • The CSV export broke columns when a value contained a comma.
  • dns-prefetch / preconnect hints for blocked hosts are removed, so the browser does not contact those hosts before consent.
  • Uninstall now cleans every site of a multisite network.
  • Invalid <th> attribute in the consent log table.

Changed

  • Code comments and source strings are in English, with the cookie-kit text domain. An Italian translation (languages/cookie-kit-it_IT.po/.mo) and a POT template are included.
  • Default texts, category names and descriptions, and policy URLs are resolved at runtime from translations. New installs follow the site language. Values saved by earlier versions, or edited by the admin, are kept unchanged. An empty text field now falls back to the default text instead of showing an empty string.
  • The iframe placeholder shows the category name instead of its ID.
  • The text domain is loaded on init.
  • Plugin header: author, GitHub URIs, neutral wording on legal compliance.
  • Added README.md, CHANGELOG.md, LICENSE (GPL-2.0) and .gitignore; rewrote readme.txt in English.

Install: download the zip below and upload it from Plugins → Add New → Upload Plugin in WordPress.