Closed (fixed)
Project:
Simple Password Reset
Version:
7.x-1.2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2013 at 00:40 UTC
Updated:
30 May 2014 at 22:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Dave Cohen commentedI haven't seen this but sounds like a serious problem.
I suspect you may have already been logged in as an administrator when you followed the brief login link. Is that possible?
Can you reproduce this consistently? If so, can you replace /brief with /orig and let me know if that makes the problem go away?
Comment #2
Dave Cohen commentedMake that /original, rather than /orig.
I tried to reproduce but couldn't. So if you can make it happen again, please let me know.
I did notice that when logged in as user/1, the form is shown. When it shouldn't be shown to anyone logged in. Not sure what's going on there.
Comment #3
Dave Cohen commentedI still wasn't able to reproduce this, but I suspect I know the cause.
Should be fixed in 1.3 release, but please confirm if possible. Thanks for the report.
Comment #4
wernerglinka commentedhi Dave,
Thanks for the quick response.
I was logged in with a supervisor role, created the user, logged out and then returned to the browser by clicking the link in the email.
I noticed that the url actually doesn't doesn't have /brief attached. Will work on this more today and try your patch and let you know if I find anything.
Comment #5
wernerglinka commentedI updated the module to version 1.3 but there is no difference. I created the new user on a different computer and before open the email link I cleared the browser cache. I also noticed that I don't have /brief appended to the login URL. Maybe these issues are connected?
Comment #6
wernerglinka commentedDave,
If you are interested in looking at this further, I can give you access to a test site on Pantheon. It is not a clean install but you would have admin access. Send me your email if you are interested.
Werner
Comment #7
Dave Cohen commentedThe /brief is not appended automatically. It's only there if you edit the email template. Whether it's there or not, the user shouldn't be getting extra roles.
Have you tried disabling the module? Could be this has nothing to do with simple password reset. If it doesn't happen when the module is disabled, how about when you manually type /original at the end of the password reset url?
Comment #8
wernerglinka commentedI appended /brief in the email template.
I also disabled the module and tested with the Drupal default method, that works fine. Also tried the password hustle module. It has other problems but does't change the roles.
Comment #9
spazfoxI can confirm that this is a bug with this module (and still exists in 7.x.1-3). When it is enabled, new users are assigned all of the roles on my site. When it is disabled, they are simply assigned the authorized user role. This is obviously a huge security risk, as users are given roles with permissions they should not have.
I'm also using the Login Toboggan module, in case it may be a conflict with that.
Comment #10
spazfoxChanging priority to critical to reflect the security implications of users being assigned all roles.
Comment #11
spazfoxI'm still experiencing this problem using the 7.x-1.x-dev version, which appears to incorporate the patch from #3.
Comment #12
spazfoxNote: I'm also using the Remember Me module, and just discovered this conflict between that module and Password Reset Landing Page that seems to result in the same problem being reported here #2081989: Combination of PRLP and Remember Me give administrator access after password reset.
Comment #13
Dave Cohen commentedCan you do me a favor and try to narrow it down? Try disabling those modules. same problem?
If not, enable the modules one at a time to narrow down the culprit. What you've written makes me suspect the problem is in one of those modules.
Comment #14
bgronek commentedI just want to also throw in the fact that I have experienced this bug as well. I too am running "Remember Me" and will perform a quick differential test. I will post shortly to notify you as to the result.
On a separate note, is there any way to flag a module as security compromised and in need of repair? This issue gave administrator access to unintended users thus creating a catastrophic security issue. It was caught in time; however, I am sure that the Drupal security group would want to be able to contain these issues.
Comment #15
bgronek commentedI have done some differential testing. This IS a result of a combination of the Remember Me module and this Simple Password Reset module. One key is that the modules must be enabled in the 'correct' order in order to cause this issue.
1. Enable Simple Password Rest module.
2. Enable Remember Me module.
3. Create a new user and check "Notify user of new account" before submitting.
4. Click on new account email link. You will be taken straight to the Reset Password page. Notice that the time zone is also not pre-set as it should be.
5. Change password and submit.
6. Notice that you are now an Administrator! Review of the new user record shows that EVERY role is checked.
7. Clean up your resume (just kidding, mostly).
Comment #16
Dave Cohen commentedI've pushed a release 1.4 specifically to address this issue. While it could be argued the bug lies with Drupal core, or remember_me.module, it seems like getting a fix out ASAP makes sense. So I committed something even without much review.
Please apply the patch below or upgrade to 1.4 release. And please let me know if the problem is not completely resolved. Thanks.
Comment #18
jtolj commentedWe ran into this on a site (user was assigned all roles, including administrator upon resetting password) and traced it to a combination of the remember_me and simple_password_reset module.
When I came to report it, I saw this commit... but it still seems a bit unsafe to take the user object from the form and assign it to the user global if it may have been modified by another module (even if the "fault" is with the other module).
This is the fix that we implemented in simple_pass_reset_pass_reset_submit():
user_pass_reset() uses similar logic
Also, was really surprised that there was not a security advisory on this issue.
Comment #19
kennyacock commentedI installed the latest (release 1.4). I enabled Remember Me first and then Simple Password Reset. I have not experienced this problem. You could try this to resolve your issue:
1. Disable both Remember Me and Simple Password Reset.
2. Uninstall both Remember Me and Simple Password Reset.
3. Reinstall/Enable Remember Me.
4. Install Simple Password Reset - release 1.4
5. Enable Simple Password Reset.