Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfe: cleanup/remove disallowed cookies #206

Open
jnorell opened this issue Jun 22, 2018 · 2 comments
Open

rfe: cleanup/remove disallowed cookies #206

jnorell opened this issue Jun 22, 2018 · 2 comments

Comments

@jnorell
Copy link

jnorell commented Jun 22, 2018

This has been questioned a lot, but it sure seems fairly doable to have the plugin actually remove cookies which should not be allowed, rather than just provide the hooks for programmers to integrate the settings.

A simple loop through all cookies set in both php and javascript, run through is_allowed_cookie() for each, and delete if not allowed ought to do it. Maybe safeguard with a hard coded exception list (so you don't delete wordpress core cookies and break admin functionality, or forget to exclude the 'gdpr' cookie itself so all cookies end up mysteriously removed).

One issue to workout is a placeholder in the cookie names like {hash}, {uid} etc. - something so is_allowed_cookie() can be just a bit smarter and match a simple regex. It should probably also handle names formatted as an array, eg. allowing 'gdpr' works to allow gdpr[allowed_cookies], gdpr[consent_types], etc.

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

No branches or pull requests

2 participants
@jnorell and others