Closed (fixed)
Project:
Taxonomy Access Control
Version:
master
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2006 at 19:14 UTC
Updated:
7 Jul 2006 at 18:27 UTC
All feeds (seem to) ignore node access permissions. Nodes can be inaccessible on the site in every way, for certain access levels, but are happily revealed to un-authenticated users in the feeds.
The affected modules, AFAICT, are node.module and taxonomy.module. (Blog.module, aggregator.module, etc. Every core module that creates a feed really.)
Setting the feeds to Titles-only lessens the security loss, but the items shouldn't be included in the first place.
I thought inserting :
$item = node_load($node->nid);
$link = url("node/$node->nid", NULL, NULL, 1);
+ if (!node_access('view', $node)) {
+ continure;
+ }
if ($item_length != 'title') {
$teaser = ($item_length == 'teaser') ? TRUE : FALSE;
on line 1417 of node.module (in the node_feed function) would do the trick.
Alas, it does not seem to help.
Comments
Comment #1
killes@www.drop.org commentedWhat kind of node access module do you use?
Comment #2
BachusII commentedThe normal ones (provide in a default install) + taxonomy_access.module.
I have not been able to exclude nodes from the feeds in any way.
The node_feed function does not seem to have any call to the node_access function.
Btw; Typo in my example. That should be
continue, not continure.Comment #3
killes@www.drop.org commentedThat might be a bug in the taxonomy_access module. The code in node_feed properly encapsulates the database query in db_rewrite_sql.
Comment #4
BachusII commentedI just (re)tried with the taxonomy_access.module deactivated and disabled.
The problem persists, and worse than before.
/taxonomy/term/TERM_ID and /taxonomy/term/TERM_ID/0/feed list the items, including teasers (which is configurable, I know).
And so do / and /node.
When I click one to view it, only does Drupal complain about that nodes permissions (as defined and configured per that nodes module.)
So, the problem is not necessarily in the feed functions, but in the functions that create a list of nodes to display (on a page, or on a feed)
Which does raise a couple of questions;
.- Why do the access controls of taxonomy_access.module not work for feeds?
- Is it (in general) the right behaviour to include inaccessible nodes (and their teasers) in dynamic node listings? Or should they not be included?
- Should the previous conundrum be an option in the settings? If yes, what should be the default?
Not the problem of Drupal core developers. But the developers behind taxonomy_access should be notified.
In my opinion not.
As far as Drupal core goes the priority of this issue could be lowered, agreed?
Comment #5
killes@www.drop.org commentedIf you disable taxonomy_access no node access checks will be performed beyond the general "access content" permission.
I think this issue should be moved to the taxonomy_access module.
I have reports that access control for RSS feeds does work with other module.
Comment #6
BachusII commentedI strongly believe showing teasers for, even the links to, inaccessible nodes is the wrong behaviour.
In my opinion the "general access" permission controls are lacking in that regard.
I agree this is no Drupal core issue.
Thanks for helping sort this out so far.
Comment #7
pwolanin commentedAre you sure you have TAC configured properly? If I put in a URL for a restricted feed like:
www.example.org/taxonomy/term/39/0/feed
or
www.example.org/taxonomy/term/39
I just get the error page unless I'm logged in.
Comment #8
BachusII commentedCrap, yesterday I had consistent results now I can't seem to replicate it anymore. I hate when that happens.
Btw; It does seem to share some symptoms with http://drupal.org/node/56393
Anyway, I'll keep an eye on it. If nothing occurs in the next couple of days we can close this issue.
Comment #9
keve commentedIf problem persist, please try it on a fresh install on your system and provide a procedure how to regenerate the bug. For me the feeds seem to work well.
Comment #10
BachusII commented(This is a (near) vanilla installation. I'm currently setting up.)
No recent problems. I guess it was a anomaly in the access tables.