Problem/Motivation
js_example module doesn't demonstrate basic security best practices on its routes.
We need to change that.
In the routes.yml file, it currently says:
requirements:
_access: 'TRUE'
This allows anyone with access to the site to see the page, which opens up other possible security concerns.
Proposed resolution
- Change the routes.yml file to say something like this:
requirements: _permission: 'access content' - Update the tool menu test to reflect that this route is not visible to anonymous users, and *is* visible once a user with 'access content' permissions has been logged in.
- Amend any tests which use these routes to log in a user who can access them.
Comments
Comment #2
sumthief commentedComment #3
mile23Comment #4
mile23Comment #7
sumthief commentedNeed manually review.
Comment #9
mile23If you click on the newest failing testbot run, you'll see that the patch causes failing tests.
So we have to figure out why the tests are failing, and then try another patch.
In this case, the results look like this:
Comment #10
sumthief commentedUpdate tests for patch #2.
Comment #12
andrew.mikhailov commentedCorrected patch.
Comment #14
andrew.mikhailov commentedSorry) I've create patch via phpStorm)
Now all should be fine.
Comment #15
andrew.mikhailov commentedEverything is ok) Please check and apply my patch)
Best regards!
Comment #16
andrew.mikhailov commentedCould you check this task?
Is everything correct for you or do we need to do some improvements?
Best regards.
Comment #18
marvil07 commentedThanks!