Versions: drupal-6.11, Atom 6.x-1.1, and modr8 6.x-1.1
A node in the moderation queue (modr8) has been found in an atom feed.
This is a serious issue for a moderated web site!
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 458034-atom-dbrewritesql-D6.patch | 3.88 KB | dave reid |
Comments
Comment #1
deekayen commentedI don't use modr8, but a quick grep of the code appears to show that it doesn't use hook_node_grants(), which is how atom would know to not show the node.
Comment #2
pwolanin commentedThis module does not provide access control - it uses db_rewrite_sql to exclude moderated nodes from (most) listings.
Comment #3
jean-bernard.addor commentedMy point is :
Using moderation (modr8) the node in moderation do not appear in RSS feeds but in Atom feeds, it is unexpected and a serious issue from my point of view. I do not understand the technical points, but maybe this issue should come back to Atom. Then I installed the atom module, I thought it was a rewrite of the rss code adapted to another protocol. Now I have the impression they work pretty differently. I am asking me why atom feeds do not behave like drupal internal rss feeds?
Comment #4
pwolanin commentedThis would suggest the bug is in the Atom module - e.g. that it's not correctly calling db_rewrite_sql()
Comment #5
dave reidThis is a security issue. Reporting to security team...
Comment #6
pwolanin commentedYep db_rewrite_sql is only applied for taxonomy, not for anything else:
Comment #7
dave reidIt is interesting to note that the results of the queries are run through node_load() and then checked through node_access('view', $node) so it's not like it didn't try. I'm wondering why this wouldn't catch nodes restricted with modr8 because sometimes I use the same logic with one of my modules.
Comment #8
dave reidRepublishing this issue because the module does run all the proper access checks. Although it should be using db_rewrite_sql() on all those queries.
Comment #9
pwolanin commentedNote modr8 is not a node access module - it just hides nodes from listings using SQL rewrites.
The technique used by this module is adding the overhead of a lot of extra queries also - it should just let node access, etc, work via rewriting the queries like core does:
http://api.drupal.org/api/function/node_feed/6
Comment #10
dave reidPatch attached for review.
Comment #11
dave reidComment #12
dave reidChanging title to be more appropriate
Comment #13
deekayen commentedI know there's lots of discussion here, but it originated at #61791: Not Respecting Node Access, so I'd prefer to move there so all the other subscribers can follow the change.