There is an access bypass issue. I'm not reporting this to the security team since the module does not meet the Security-advisory policy yet (not a full release).
This issue was discovered while I was reproducing #2383903: Cannot save queues with entities user doesn't have access to
Steps to reproduce
- Create an Entityqueue of nodes
- Add a published node to the queue
- Edit the node, and unpublished it
- Login as a user who does not have access to view unpublished nodes
- Edit the queue and see the node title
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2442875-2.patch | 1.1 KB | amateescu |
| #1 | entityqueue-access-bypass-2442875-1.patch | 1.17 KB | jojonaloha |
Comments
Comment #1
jojonaloha commentedAttached is a patch to fix the access issue only. It does not resolve #2383903: Cannot save queues with entities user doesn't have access to
Comment #2
amateescu commentedWe should probably follow what entityreference is doing and rely on the
getLabel()method of the selection handlers. Something like this.Comment #3
nerdacus commentedBoth patches work in the sense that they remove the label from the immediate view of the list. Patch #2 falls short in that the label is still converted to a link, which, if URL aliases to entities are being generated from the entity labels, the parts (or all) of the label can be viewed by a nosey user. Also, the entity ID is still appended to the "- Restricted access -" label, giving a malicious user more information than it should.
In short, I'd go with patch #1.
Comment #4
amateescu commentedThis is also what Entity reference is doing and it was deemed as not a security problem.
And you're right, my patch doesn't take into account the url part (why do we even link to the entities in first place?), so the patch in #1 looks good to me.
Comment #6
jojonaloha commentedCommitted e817f10
Comment #7
amateescu commentedI think it's about time to finally push a stable release, or at least an rc or something. What do you think?