Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2012 at 21:40 UTC
Updated:
6 Mar 2013 at 19:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
saitanay commentedHi Zeip,
Looks like good idea,.
Below are the comments from Ventral Automated review:
FILE: ...al-7-pareview/sites/all/modules/pareview_temp/test_candidate/README.txt
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
24 | WARNING | Line exceeds 80 characters; contains 81 characters
--------------------------------------------------------------------------------
FILE: ...ll/modules/pareview_temp/test_candidate/developer_authentication.module
--------------------------------------------------------------------------------
FOUND 5 ERROR(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
97 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
97 | ERROR | Comment indentation error, expected only 1 spaces
98 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
99 | ERROR | Line indented incorrectly; expected 2 spaces, found 0
99 | ERROR | There must be no blank line following an inline comment
--------------------------------------------------------------------------------
@ http://ventral.org/pareview/httpgitdrupalorgsandboxzeip1407262git
Once fixed you could re-run the review to check the status.
This reviews just the formatting and other Drupal coding standards. Someone would review the code manually once its is clean.
Comment #2
zeip commentedI fixed major style issues previously, but now all the problems reported by the autoreview should be fixed. Thanks for the review!
Comment #3
chintan.vyas commentedThere is still a master branch, remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732.
I haven't played much with this module but some quick manual review.
Manual Review
Regards,
Chintan Vyas.
Comment #4
chintan.vyas commentedForgot to change status :P
Comment #5
patrickd commentedI'm afraid you did not point out a single issue which justifies setting 'needs work'.
Comment #6
chintan.vyas commentedI mentioned 5 points in #3 Manual review.
Comment #7
zeip commentedThanks for the review. I did the changes chintan.vyas suggested, even though I think most of them are optional (at least 1 and 5). I did not add a validation function since I don't think it's necessary.
Comment #8
zeip commentedI reverted the fix for point 3, since the automatic code review complains if not using get_t() to find the t() function.
Comment #9
Anonym commentedHello. I tested the module with LDAP:
Patch to fix
Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in function _developer_authentication_ldaplogin() (line 104 in file /.../sites/all/modules/developer_authentication/developer_authentication.module).Comment #10
zeip commented1. Weird, sorry for not noticing that! I prefer return values, so I added such.
2. I added a check for the only required setting (base DN) to the form function – it outputs an error message if that's not set.
3. That's because I've made it for clusters of multiple sites, and I'm using it via a setting file for all the sites in /etc – so if the config changes I don't need to change the setting to each site, and on the other hand I can move the sites between servers and have different settings on each server (production servers can have the LDAP part set up and local environment can have the SHA1 password set for login with user "admin"). So it's really a matter of the meant usage – of course it can also be used by setting the settings per-site.
4. The current code only accommodates for all users under the specified DN being able to login.
Comment #11
zeip commentedElevating priority per guideline (last status change was July 25th.)
Comment #12
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #13
bircherHello
I could not test it with LDAP but from looking at the code and the variable authentication I can say it looks pretty good.
The only thing I would classify as a bug at this point is the fact that you allow the log in with a master password but you still get the error:
So either make it as a warning or better blend it out if
developer_authentication_admin_pwdis set.Although I do it myself on most of my sites it would be better to call the username not admin. That could also be a setting or defined in a variable. After all it is a second field to get right when hacking the site.
I am not the most experience reviewer but I would give it a rtbc if you fix the LDAP warning.
see you
Comment #14
zeip commentedI changed the message from error to warning, thanks for the suggestion! It's also not shown if the admin pwd is set any more.
IMO setting a fixed password for an admin account isn't that good an idea as-is, so I think the added security of changing the admin name isn't too useful. It's a good idea to make it a variable, though; I'll add it to my list. Often hacking is also tried on the /user page; the hacker might not try /devlogin at all.
Thanks for the suggestions, hope the application's now ok!
Comment #15
bircherHello
Yes we are absolutely on the same page about the password and the security then. And I agree with you that the fixed name is not a show stopper.
Then again the password for user 1 also needs to be taken care of and I have the feeling that that also doesn't happen often... And I guess if you enable this module you are well aware of the risk. After all, you mentioned it.
So in my opinion you are good to go.
Good luck!
Comment #16
zeip commentedIssue has been in RTBC for three weeks.
Comment #17
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #18
zeip commentedComment #19
jthorson commentedI would probably raise the visibility of the usage warning on your front page, as this does have the potential to severely compromise the security of a site if misused. I'd also suggest that having an option that logs the user in as a specific user who is NOT user #1, but a secondary admin account with full permissions, would be a bit safer ... as you would not be exposing UID #1, and the admins setting up the site would have to consciously consider what permissions they were making available before the module could be used (and those who do not know the security risks couldn't inadvertantly expose them).
That said, the code is clean and it uses the APIs properly ... I haven't tested as I don't have an LDAP server readily available, but I don't see any immediate red flags. Thus ...
Thanks for your contribution, Zeip!
I updated your account to let you 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 get 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.