We had discussed in #drupal that we need to review the success of our node access controlls before releasing Drupal 4.5.

For starters I found that our feed function do not honour our acccess lists at all. See attached patch.

This:
grep "{node}" * | grep -v node_access_join_sql

Might be usefull in spotting other weaknesses. Not all of those queries need fixing, of course.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

The atom module probably needs to be udpated too.

IMO, it wouldn't hurt to have _db_query() check whether the access controls are in place.

Anonymous’s picture

Uh oh!

This patch also seemed to include the changes decided to be a bad idea over in this issue... namely, it sorts the "latest blog entries" by sticky, forcing all users' sticky posts to the top and obscuring the actual newest posts.

I'm not near a workstation where I can make a patch at the moment, but the change that needs to be made is:
"BY n.sticky DESC, " should be removed from line 163 of blog.module. (in the function blog_page_last()).

Setting this back to patch so it gets attention.

killes@www.drop.org’s picture

Yeah, sorry, unclean patch base. Patch forthcoming.

killes@www.drop.org’s picture

FileSize
1000 bytes

This patch reverts the ORDER BY change. Sorry again.

Dries’s picture

killes@www.drop.org’s picture

Assigned: Unassigned » killes@www.drop.org
FileSize
1.36 KB

Here is another patch. The comment search would have shown matching comments even if you could not access them because the node isn't accessible. The patch isn't really tested for lack of test data.

killes@www.drop.org’s picture

FileSize
6.35 KB

Here is another patch for book.module.

Dries’s picture

I suggest we keep the check in node.module and use an isset() ... looks simpler to me.

Dries’s picture

Nevermind my previous comment. I committed the patches to HEAD, yet I had to modify the book.module patch for it to work.

Anonymous’s picture

It does not look like the book.module got applied to me... could you please double-check?

Dries’s picture

I did now. Thanks.

killes@www.drop.org’s picture

FileSize
959 bytes

The was (again :() a bug i the last patch.

Dries’s picture

Anonymous’s picture