Problem/Motivation
https://git.drupalcode.org/security/185463-weight-security/-/work_items/1 was closed opting to resolve this security issue through public hardening.
The module doesn't sufficiently check access when saving weights submitted through its Views "weight selector" field. Any user who can view such a view can change the weight of every entity it lists, including entities they are not normally allowed to edit.
Steps to reproduce
- As an administrator, adding a "Weight" field (field_weight) to the "Article" content type and creating a page view of Article content that includes the field "Content: Weight Selector (field_weight)" and is accessible to users with the "View published content" permission
- As an administrator, creating some Article nodes
- As an anonymous user (or any user with only the "View published content" permission), opening the view page, changing the weight select lists (or dragging rows, if the view uses the Table format) and clicking "Save"
Proposed resolution
This is a change from previous behavior and might inadvertently impact some use cases. However, lets require permission to edit each entity and its weight field in the Views weight selector field.
Remaining tasks
User interface changes
API changes
Sites that let users reorder content they cannot edit must now grant them edit access.
Data model changes
Issue fork weight-3639203
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 #4
heddnThis was already RTBC in the private security tracker before it was decided to publicly resolve. Therefore just merging it.
Comment #6
heddnhttps://www.drupal.org/project/weight/releases/8.x-3.7