With profile role enabled, going to a link of type

/user/%uid/edit gets acccess denied (%uid is any uid other than the current user)

but

/user/%uid/edit/%category-name gets me a page where i can then edit the profile of another user (%category-name is what it sounds like it is)

thus any user can edit any other users profile.

CommentFileSizeAuthor
#5 559630-user-edit-access.patch662 bytesboombatower

Comments

sinasquax’s picture

maybe it's the line 63 :

return user_edit_access($GLOBAL['user']);

which must be :

return user_edit_access($user);

Because user_edit_access will always return TRUE with $GLOBALS['user'] passed as $account parameter (return (($GLOBALS['user']->uid == $account->uid) || user_access('administer users')) && $account->uid > 0;)

But i don't have tested that !

alioso’s picture

That worked and fixed the problem.
This needs to be committed in the next release. This is a pretty big security issue. Good find. Thanks!

clearbrook’s picture

I'll patch as I load or won't load at all. I'd like to think this should not be advertised unless fixed already. I intend to use this to deal with spammers who are sometimes hackers as well. So this could lead to more mahem than it solves.

colin49’s picture

I came across this security bug as well and can verify that sinasquax solution fixes the issue. Hopefully the maintainer will roll that fix into a new release asap.

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Needs review
StatusFileSize
new662 bytes

Sorry about delay, I've been quite busy.

Thanks for posting the fix. I confirmed that it seems to do the job.

boombatower’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)
Issue tags: -Security

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