Closed (fixed)
Project:
Security Review
Version:
3.0.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2024 at 16:48 UTC
Updated:
8 Aug 2024 at 15:34 UTC
Jump to comment: Most recent
Since #3422431: Port views access batch to new plugin mechanism, the views_access check never finds any problem.
That's because in ViewsAccess::run(), the $findings variable is initialized for each view.
Install the webform module.
The "Webform submissions: default" view display is not protected.
Run the views_access check : it does not find this problem.
The findings should be correctly stored in $sandbox['findings'].
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
prudloff commentedComment #4
smustgrave commentedCan you check the setting if you're skipping default.
Comment #5
prudloff commentedWhat do you mean? The setting is already checked here and the display will not be added to
$sandbox['findings']if the default is skipped.Comment #6
smustgrave commentedThere’s a setting form for ignoring default
Comment #7
prudloff commentedYes and
$ignore_defaultcontains the value from this setting and is then used in the loop to ignore the default display.This logic is already there and I have not changed it at all. What are you asking me to do exactly?
Comment #8
smustgrave commentedJust making sure you had the setting checked in the form
Comment #9
prudloff commentedOh OK. No I don't have this option checked. We do want to check the default display.
I also tried with a non-default display to be sure and I still can reproduce the bug (and the patch fixes it).
Comment #10
smustgrave commentedSo I tested by enabling the show default view setting
Edited the admin content default view to be unrestricted
Ran the check
It captured the finds as expected.
Comment #11
prudloff commentedIs the content view the latest enabled view of the first batch of 5 by any chance?
foreach ($views as $view) {will loop on a batch of 5 views and only keep the findings of the latest in this batch. It will then loop on another batch and keep the latest findings in this batch, etc.So you can by chance avoid the bug if your view is at the end of a batch.
A way to reproduce this is to unprotect the default display of 4-5 views and run the check: it will only display an error for some of the views.
Comment #14
smustgrave commentedThat was it.