Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Nov 2012 at 23:16 UTC
Updated:
4 Jan 2014 at 02:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
parwan005 commentedHi,
here are my responses to your manual review done:-
1) You are using variable_get in your module without mentioning its default value. Found it in simple_ldap_role.module line 78. Default value should also be set while using variable_get
2) simple_ldap_test.module file is empty
Also make sure to fix your ventrail issues here : http://ventral.org/pareview/httpgitdrupalorgsandboxbchavet1845170git
Thanks
Parwan
Comment #2
blc commentedThanks for the review!
1) You are using variable_get in your module without mentioning its default value. Found it in simple_ldap_role.module line 78. Default value should also be set while using variable_get
According to api.drupal.org, the default $default is NULL, which is fine for all locations where I do not specify a default. (http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/varia...)
2) simple_ldap_test.module file is empty
This is by design. simple_ldap_test is a hidden module that serves as the glue to enable SimpleTest in the other simple_ldap* modules. This hidden module is needed because in order to run tests, a real LDAP server is needed, along with some known entries. simple_ldap_test provides a location to configure this. I will add some text at the top of that file to explain.
3) Also make sure to fix your ventrail issues
I am reviewing the ventrail issues you linked to. I used drupalcs to verify coding standards, but the report I get does not match what your report shows. I even tried the latest 7.x-2.x branch of coder with no change. I'm not sure what is up there, but your report looks right according to the drupal coding standards documentation, so I will keep digging. I certainly want to make sure I have an accurate set of dev tools.
I can comment on the first section of the report, though. These functions are overridden from password.inc as described here: http://api.drupal.org/api/drupal/includes%21password.inc/7, so the function names cannot be changed. simple_ldap_user needs to handle passwords in plain-text in order to properly encrypt and send to the LDAP server. Password.inc is the only location that this can be intercepted.
Thanks again, more information to come after further review.
Comment #3
carwin commentedA run through of the module and submodules in this project via PAReview.sh returned: Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards.
See attachments for more details.
simple_ldap.infodeclare classes, no issues.The Coder results are gigantic, so you'd probably be better off just running it through yourself. Most of it seems related to the tests failing. I'm attaching a link to the screenshot because it's too big for d.o: https://docs.google.com/open?id=0B2ENsfpXRywVU3JSWlFjWDNGQ0U
The PAReview.sh / ventral results have been addressed in your last comment, but I'm attaching screenshots here to keep things all in one place as much as possible. Coder and similar dev tools aren't always perfect.
I scanned the files pretty quickly and didn't notice any outstanding coding style errors. This could probably use a security check from someone more qualified than I.
Comment #4
q0rban commentedYes, what you have done there is perfect, blc. Also, these are the same findings that @carwin posted in his first attachment, so they can be disregarded there as well.
As @blc mentions, the default value is NULL in Drupal 7, and it isn't necessary to explicitly specify. That was only the case in Drupal <= 6.
A couple of other things to note.
Overall, this module is a fantastic alternative to the existing LDAP module. Whereas the current LDAP module errs on the side of flexibility, this module, true to its name, errs on the side of simplicity. In my opinion, there need be no discussions in this issue of trying to combine these modules, or work together as maintainers, as they have fundamentally different goals, and trying to make the one marry to the other would end up losing what is good about either project.
The code in this module is immaculate, and speaks to the care and attention to detail that @blc has given this module. In addition to having a solid object oriented API, there are simpletests for every critical aspect of the module, such as user authentication, role creation/deletion, password security, and the list goes on.
We are using this module in a production environment that has 7000+ users with success. In addition, @blc has been very responsive and quick to fix issues as they've arisen.
All in all, this project gets one HUGE +1 from me. I don't think any of the above issues need to be addressed before this module gets approved. There are modules currently in contrib that don't hold a candle to the quality of work already present in this module (including my own), and everything mentioned above is just icing on the cake. Great work, @blc!
Comment #5
blc commentedI've fixed everything in the ventral report as possible, here are my justifications for the remaining items. http://ventral.org/pareview/httpgitdrupalorgsandboxbchavet1845170git
This was mentioned on in #2. These functions are part of password.inc, which was overridden, and cannot be renamed.
Same as above. I copied password.inc from core, and made a few conditional additions to handle LDAP encryption. The items ventral is complaining about is core code, which I am not going to change.
This is a comment, doesn't make sense to indent 8 spaces:
This property is intentionally private because it handles passwords. It needs to be write-only, even to extending classes (security). This is documented in the code as well.
Comment #6
juampynr commentedAgree with @q0rban about the REAME.txt contents. These should be moved to simple_ldap.api.php. There are some tips about what should README.txt files have at http://drupal.org/node/447604.
The simple_ldap_role README.txt is empty, while the contents of simple_ldap_user's README.txt should be moved to simple_ldap_user.api.php.
Aren't here any libraries or extensions that this module needs? If so, implementing hook_requirements() would ensure they are met.
There is a small typo at SimpleLdapSchema
simple_ldap_role.test misses some docblocks at the top of some of the test classes.
Looking at simple_ldap_user.password.inc, I see several functions that do not follow the modulename_function pattern, which could cause collisions. Is there a reason for that? Besides, aren't Drupal's password and hashing functions useful for this scenario?
These are very simple fixes and questions. The module looks very robust overall. Nice work!
Comment #7
blc commentedDone.
Done.
http://drupal.org/node/1847214
According to the OO coding standards doc (http://drupal.org/node/608152) prefixing class functions with an underscore is a no-no. I do want to throw exceptions, though. And it has been on my radar, but all of the LDAP functions return FALSE on error, which is what I am currently checking for. So, there is error detection, but it is very basic at this point.
http://drupal.org/node/1847220
Done.
Comment #8
blc commentedComment #9
blc commentedNo activity for 2 weeks. Bumping priority per the guidelines at http://drupal.org/node/539608
Comment #10
juampynr commentedBased on the above reviews and fixes, I am marking this as RTBC.
Comment #11
carwin commentedBump for RTBC, I can't find anything wrong with this.
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 #12.0
blc commentedAdd a pareview reference
Comment #12.1
blc commentedreview bonus
Comment #13
blc commentedReviews added to the summary
Comment #14
jthorson commentedThanks for your contribution, blc!
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.
Comment #15.0
(not verified) commentedreview bonus