Nodes with Log Messages are always displayed with the log message to all users. This is a result of the removal of moderation from core ( http://drupal.org/node/72343 ).

Patch simply removes the problematic code.

CommentFileSizeAuthor
#3 logpatch_0.txt642 byteswebernet
logpatch.txt677 byteswebernet

Comments

webernet’s picture

To clarify:

When moderation was removed, a clause in the if statement was also removed - thus making it always return true (except in a teaser).

This means that any log message will be displayed to anyone reading the node. (A possible security concern.)

Code seems to have only been used for moderation - thus it should be safe to remove it.

chx’s picture

would a #access be a better idea? Or just remove it?

webernet’s picture

Priority: Normal » Critical
StatusFileSize
new642 bytes

If you feel the user_access() route is the way to go, then here's a patch that checks for the 'view revisions' permission before displaying the log message.

Also bumping to critical due to private log information being disclosed.

flk’s picture

Status: Needs review » Reviewed & tested by the community

lol had problem reproducing this problem (newb :P) but finally found it...the problem only occurs with book pages (i think they are the only one's that have log messages...).

anyways i tested patch from comment #3 which i can confirm resolves the problem by making sure the user viewing the book-page has 'view revisions' permission.

webernet’s picture

As of 5.0, only book pages allow users to add log messages. Previously, in 4.7 you could also add them to "page" nodes, but this functionality was removed/forgotten in the pre-CCK patch.

Log messages are also added automatically when you revert to a previous revision of any node.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks webernet! :)

Anonymous’s picture

Status: Fixed » Closed (fixed)