[drupal-devel] [bug] Incorrect access checking for username auto completion

Dries drupal-devel at drupal.org
Tue Jul 5 18:24:19 UTC 2005

Issue status update for 
Post a follow up: 

 Project:      Drupal
 Version:      cvs
 Component:    node.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  drumm
 Updated by:   Dries
 Status:       patch

Say we wanted to make the Author-field on "edit comment" pages editable.
I think the permissions would clash, and you'd be able to by-pass
permissions if you have access to at least one (because they'd all
share the same callback).  So, I don't think this solution is
sufficiently generic and possibly insecure. Not?


Previous comments:

June 9, 2005 - 02:36 : drumm

The auto completion for user name on node edit pages checks
user_access('administer users') when it should be something more like 
node_access($node, 'edit').


June 10, 2005 - 17:32 : Thox


The current "Authored by" field is only for users "administer nodes"


June 10, 2005 - 17:35 : Thox

Whoops, administer nodes != administer users. This makes things

The true permission should be administer nodes... which almost suggests
that the autocomplete function should be part of node.module, not
user.module. It depends where else the autocomplete is used in the


June 10, 2005 - 17:57 : killes at www.drop.org

I think the function should stay in user.module, but node.module should
get a menu callback that utilizes it. This is not a problem as
user.module is a required module.


June 10, 2005 - 21:40 : Thox

Attachment: http://drupal.org/files/issues/access.patch (1.55 KB)

Attached patch moves the menu entry from user.module into node.module
and fixes the permission check.

More information about the drupal-devel mailing list