Password Reset tabs is a simple UI for changing drupal password.It provides a simple workflow,i.e a series of tabular steps on same page for changing drupal user account password.
Though there are some modules available which bypass the one time login form, which appears after pasting password reset link, ex: simple_pass_reset
How Password Reset tabs is Different:
Password Reset tabs module provides a complete workflow for changing the password on the same page, instead of redirecting the user from reset form to reset link and than to one time login form after which user goes to account form and changes password.
This module provides a very simple UI for forgot password workflow which lot of users need in their website.
Project Page: PasswordResetTabs.
GIT Repository: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/saurabh.tripathi.cs/2403787.git password_reset_tabs
Manual reviews of other projects:
Review cycle one:
https://www.drupal.org/node/2445039#comment-9683881
Review cycle Two:
https://www.drupal.org/node/2446929#comment-9699347
https://www.drupal.org/node/2450675#comment-9711517
https://www.drupal.org/node/2316301#comment-9712245
https://www.drupal.org/node/2450089#comment-9715851
Review cycle three:
https://www.drupal.org/node/2508652#comment-10045050
https://www.drupal.org/node/2501103#comment-10045344
https://www.drupal.org/node/2507433#comment-10045396
https://www.drupal.org/node/2505219#comment-10045430
| Comment | File | Size | Author |
|---|---|---|---|
| #39 | password_reset_tabs -7.x-1.x.zip | 153.2 KB | saurabh.tripathi.cs |
Comments
Comment #1
saurabh.tripathi.cs commentedComment #2
saurabh.tripathi.cs commentedComment #3
saurabh.tripathi.cs commentedComment #4
kandy-io commentedManual Review
I have just install your module and verify i have some points:
Comment #5
das.gautam commentedHello Saurabh,
The "core" key is used twice in password_reset_tabs.info, please correct.
core = 7.x
core = "7.x"
Comment #6
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #7
saurabh.tripathi.cs commentedHi,
I have fixed #4 and #5.
Removed extra core defined in info file.
Added hook_help and hook_permission.
Thanks
Comment #8
saurabh.tripathi.cs commentedComment #9
anup.singh commentedHi Saurab,
module_load_include('inc', 'user', 'user.pages'); is used at both header of file and in function definition of password_reset_tabs_pass_reset_page();
Comment #10
saurabh.tripathi.cs commented.
Comment #11
saurabh.tripathi.cs commentedHi,
Fixed #9.
Thanks.
Comment #12
saurabh.tripathi.cs commentedComment #13
joshi.rohit100Review :-
1. Don't know why you have
in module starting ?
2. Few methods returning string / message without using t(). Example - password_reset_tabs_validation().
3. No documentation for $option array in password_reset_tabs_pass_reset_page().
Also I checked the reviews done by you and most of them looked to me same as pareview bot. So I am removing the PAreview bonus tag. Do review 3 more applications.
Thanks
Comment #14
saurabh.tripathi.cs commentedHi Rohit,
Thanks for the review.
1) I have included user.pages.inc file as in the menu callback user_pass form is being called.
Added Documentation for the same.
2) Used t() everywhere returning string / message.
3) Added documentation for $option array in password_reset_tabs_pass_reset_page().
4) I am Reviewing other projects with different perspectives.
Example:https://www.drupal.org/node/2446929#comment-9699347
Note: I am new in review process so a set of guidelines as how to review other projects would be helpful.
Comment #15
kandy-io commentedHi! saurabh.tripathi.cs
in: password_reset_tabs_menu()
EDIT: titles in hook_menu() must not be translated with t(), so this is fine.
Comment #16
saurabh.tripathi.cs commentedThanks again for this review.
Well i researched about this.
For now :
On exploring this link i found that menu title are given inside t(). here:
https://api.drupal.org/api/drupal/includes%21menu.inc/group/menu/7
But Drupal 7 core modules are not following this also i checked some contributed modules, they are also not using this.
Seems to me it is not a standard.Also i got some suggestions from other drupal developers: do not use t() in menu.
Comment #17
saurabh.tripathi.cs commentedComment #18
shashwat purav commentedAutomated Review
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #19
nitesh pawar commentedComment #20
nitesh pawar commentedComment #21
saurabh.tripathi.cs commentedHi shashwat-purav ,
Thanks for the review.
Fixed issues mentioned in #18.
In Your recommendation : "You can allow to change password of the all existing users on the site for users with certain roles (admin roles)."
By this if you mean than any user can change password than it is already implemented.
Also you can give permission to any role for accessing this link and changing password.
Comment #22
saurabh.tripathi.cs commentedComment #23
shashwat purav commented@saurabh.tripathi.cs, I'm just mentioning that "admin" role can have privilege to change other user's passwords too.
On the other hand, it's your design. You can pick up my suggestion as a feature request.
Comment #24
saurabh.tripathi.cs commentedComment #25
saurabh.tripathi.cs commentedComment #26
klausimanual review:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #27
klausiOK, posting the details about the vulnerability now:
password_reset_tabs_pass_reset_page() is vulnerable to access bypass problems. Any anonymous attacker can login as arbitrary user by just going to the page /user/reset/1/f/a/i/l and BOOM! They will be logged in as user 1. You need to make sure that users can only login if their password reset link is valid.
Comment #28
saurabh.tripathi.cs commentedHi klausi ,
Thanks for the review.
I have fixed all the points mention above comments.
1. module_load_include() moved to function instead of global scope.
2. Removed drupal_render()
3. Security vulnerability : Provided a Access callback function to handle password_reset_tabs_pass_reset_page() vulnerability to access bypass problems.
Comment #29
saurabh.tripathi.cs commentedComment #30
kandy-io commentedManual Review:
In password_reset_tabs.module
Line: 138:
$timestamp <= $current && $account = reset($users)We should place out of if statement, and make sure $account not empty before you use it: $account->login
like this:
Line 93,175:
Becarefull with arg(2) and make sure it not empty = if(isset(arg(2))...
Comment #31
kandy-io commentedComment #32
saurabh.tripathi.cs commentedHi kandy-io,
Thanks for the review.
$account is being assigned value from $users:
So i don't think there is a need for an empty check there.
Added check for arg() and that serves good for $user also.
Comment #33
saurabh.tripathi.cs commentedComment #34
suhel.rangnekar commentedIn password_reset_tabs.module
Line: 138:
$timestamp <= $current && $account = reset($users)
you should check the !empty for $account before use otherwise it's gives error while accessing the $account object.
So add validation for $account variable.
like kandy-io said,
$account = reset($users)
if($timestamp <= $current && !empty($account)){
Comment #35
saurabh.tripathi.cs commentedThanks suhel.rangnekar,
Added the empty check.
Comment #36
saurabh.tripathi.cs commentedComment #37
saurabh.tripathi.cs commentedComment #38
myvo commentedHi saurabh.tripathi.cs,
In "password_reset_tabs.info" file has script:
Please add this file into git repos, or if it's not use, please remove this line.
Comment #39
saurabh.tripathi.cs commentedComment #40
saurabh.tripathi.cs commentedHi myvo,
The js file is now in git repo also,
Thanks
Comment #41
klausiRemoving review bonus tag, you have not added 3 more reviews to the issue summary? Please only add it back when there are at least 6 manual review comments in the issue summary.
Comment #42
saurabh.tripathi.cs commented@klausi,
I did add 4 new reviews to the issue summary.These are new reviews.May be you want me to list all the reviews in the summary?
Please clarify.
Thanks
Comment #43
saurabh.tripathi.cs commentedComment #44
klausiyes, please list all your manual reviews in the issue summary. Thanks!
Comment #45
klausiRemoved automated reviews with no manual source code review.
Comment #46
klausiReview of the 7.x-1.x branch (commit 297c110):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
Please make sure that you test your module properly against all scenarios, since this very security sensitive functionality.
Comment #47
saurabh.tripathi.cs commented@klausi,
Thanks for this review.
Status for the issues mentioned in #46
ES LINT issues: Fixed and tested
Manual review:
1)Added fourth parameter $uid.
2)Removed arg() as it was not needed.
3)Added comment for destroying session.
4)Provided access denied for new password tab.
I have tested this module for all above scenarios.
Comment #48
saurabh.tripathi.cs commentedNew Improvements:
1) Converted drupal_goto to form redirect.
2) Optimized nested if else statements using ternary operator.
3) Handled menu security by token generation.
4) Removing hook permission as menu security handled by tokens and also this functionality should work for anonymous.
5) Retested this for all security loopholes.
Note: Security for menu alter remains by providing separate access callback.
Comment #49
tusharbodke commentedHi Saurabh,
I installed, tested and ran through your code. Everything looks great! This can be used as a new UI for changing Drupal password.
Reports
Online Automated testing report
http://pareview.sh/pareview/httpgitdrupalorgsandboxsaurabhtripathics2403787git
Code is clean.
Manual review result:
Individual user account
Yes
No duplication
Yes
Master Branch
Yes
Licensing
Yes
3rd party assets/code
Yes
README.txt/README.md
Yes
Code long/complex enough for review
Yes : Code is long enough for review.
Secure code
Yes : Looks secured
Coding style & Drupal API usage
Yes : Looks good and follows drupal coding standards.
Thanks for your contribution, Saurabh.
Comment #50
joshi.rohit100scripts[] = js/password_reset_tabs.jsThis will load your js file on every page whether it is required or not.
It should be loaded on required pages only.
Comment #51
cweagansThanks for your contribution!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.