If you put characters after the user id in an link to the users page, e.g. ".../?q=/user/1asdfa" the page for that user shows, regardless of access rights, even for an anonymous user. In a standard drupal installation this would show the time the user has been a member and the username of the user id. Additional information that is confidential might have been added, so this could possibly be a harmful bug.
Steps to reproduce:
1) without loggin in, write the url to a existings user, e.g. ...?q=/user/1. The page is not accessible, due to access restrictions.
2) add additional characters after the url above, e.g. ...?q=/user/1a. The user page now shows.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | non-numeric_uid_bug_4.7.png | 50.47 KB | puregin |
Comments
Comment #1
chx commentedLet me ask for verification, this is surely in 4.6.5?
Comment #2
dublin drupaller commentedI was able to recreate this issue in Drupal 4.6.4
Dub
Comment #3
puregin commentedIn 4.7, the user profile is not revealed, but the non-numeric 'uid' shows up on the user login form. See attached screenshot
Comment #4
dublin drupaller commentedI was also able to recreate this problem in Drupal 4.6.3..
Dub
Comment #5
saerdna commentedi get the same error with head as puregin. This is not funny if someone spread the url drupal.org/user/SIGN_UP_TO_THIS_CRAPPY_SITE/ :-)
Comment #6
dublin drupaller commentedquick fix for Drupal 4.6.3 & Drupal 4.6.4
Replace the theme_user_profile (which starts on line number 614) with the following.
I don't have a CVS or 4.7 beta version installed at the moment to try the same with that.
hope that's of use to others and is only a temporary (emergency) fix until the source of the problem is resolved.
Dub
Comment #7
dublin drupaller commentedSorry. Forgot to mention the above if for the user.module (for Drupals version 4.6.3 , 4.6.4 and 4.6.5)
Dub
Comment #8
wellsy commentedJust to confirm that the bug exists in 4.6.3 and that the quick fix (#6) by Dublin Drupaller works (thanks for that).
It does seem to add some minor problems to the resulting page.
Visit http://www.orchidsonline.com.au/interactive/?q=/user/1asdfa to see the results.
Obviously that is better than being able to get to user info without authorization but it needs to be looked at.
wellsy
Comment #9
dublin drupaller commentedSorry Wellsy...it was intended as an emergency fix only...I think what's happening is that Drupal is picking up the user/n argument, checking access and then displaying the access denied message. But it then picks up on the user/n+added letters argument and tries to display the page again.
I'm looking at it now to see why that's the case, so while the emergency fix (posted above) isn't perfect, at least it protects the user profiles from anonymous viewing until we suss out what's going on
Dub
Comment #10
wellsy commentedYep...understood.
I was basically agreeing with what you have just said
wellsy
Comment #11
venkat-rk commentedThis doesn't seem to be an issue if one is using clean urls. I just tried it on my 4.6.5 site with clean urls and I only see the Access Denied message.
Comment #12
wellsy commentedhas this issue been fixed now in the latest version of 4.6.5 available for dowload from drupal.org?
I just tested and my new install (recent download) and all appears to be good.
Comment #13
wellsy commentedAh....Just been checking my old install (noticed an anonymous visit in the logs) and found that if you enter user/111asdfa then (if there is that number user) you can see the user details. No editing options are available.
user/11asdfa does not work
So the quick fix seems to have a weakness I am sorry to say
I wonder whether user/222asdfa works? Or user/333asdfa works?
Sorry I do not have that many users to check.
Note: my install is 4.6.3 with the quick fix
Comment #14
magico commentedComment #15
(not verified) commented