When displaying messages in the block, admin_message doesn't check that the current user has permission to 'access content' (it's common for anonymous users to lack this permission on private sites) or check node_access('view', ...) before displaying the individual node.

I have a site where the message block was configured to show at the top of every page and anonymous users didn't have 'access content'. Without this patch, this amounted to anonymous users seeing all the messages - when they should be shown none of them. This patch fixes this problem!

CommentFileSizeAuthor
node_access.patch1.38 KBdsnopek

Comments

dsnopek’s picture

Status: Needs review » Fixed

Committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.