Problem/Motivation
I'm aware of the https://www.drupal.org/node/2319205 documentation linked in the code, but the module unintentionally provides access to routes which should only be accessible with a valid CSRF token.
Steps to reproduce
1. Enabling the token module.
2. Visit /token/tree page as an anonymous user, it should show an access denied because it requires a valid CSRF token to be shown.
3. Enable the flag module
4. Visit /token/tree page as an anonymous user, and they're now able to access and view all the available tokens for the site which they shouldn't be able to.
It depends why this override is necessary, but if it's specifically for flag specific routes, then I think it should only apply the anonymous CSRF behaviour on those routes.
Proposed resolution
See MR
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork flag-3638488
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
anybodyComment #4
anybodyPS: I added comment which explain that this is safe and expected, to not cause false-positive's in future reviews.
Comment #5
grevil commentedLGTM!