Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Sep 2011 at 18:29 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gregglesPlease take a moment to make your project page follow tips for a great project page. Given that there are other tools to do this it would be great to add a section to your page that compares your tool to other similar tools.
Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.
Feedback from coder: "152 normal warnings, 83 minor warnings"
I noticed some very small code style issues. Please run the coder module on "minor" setting to help catch these. The coding standards have even more information in this area. I noticed things like using tabs instead of spaces and putting { on their own line. Coding standards help make your module easier to review.
Remove the
version = "7.x-1.0"line from your .info - that will be added by the drupal.org packager automatically. Remove thefiles[]lines from your .info - those are only necessary if the files contain classes. See http://drupal.org/node/542202#filesThe bulkpub_log feature is pretty non-standard. I suggest using watchdog for that. In particular watchdog should be used in bulkpub_validate_user to prevent brute force attacks on user/password combinations.
I believe bulkpub_get_page should check node_access('view' prior to returning the content. The same goes for bulkpub_delete_page for node_access('delete', $node). If your stance is that any user with the BULKPUB_PERMISSION_STR can do those things then that should be stated really clearly in the README.txt.
On a related note ;) Please take a moment to make your README.txt follow the guidelines for in-project documentation.
Comment #2
rjohnson42 commentedThanks for the comments. I will get started making the suggested changes.
Comment #3
rjohnson42 commentedI just finished making the changes requested. Please take another look.
Comment #4
doitDave commentedHi rjohnson42,
coder results look already good. Some manual results:
Implement hook_foo_bar().while the common standard is Implements. You should make sure all hook function comment headers use the "official" syntax.Cheers, d.
Comment #5
rjohnson42 commentedI will begin working on these changes.
Comment #6
rjohnson42 commentedThe code now has Doxygen comments in it and the 7.x-1.x branch has been created.
Comment #7
klausiThere are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:
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. Go and review some other project applications, so we can get back to yours sooner.
manual review:
Comment #8
rjohnson42 commentedI think I have addressed all the comments from the last review.
Comment #9
rjohnson42 commentedNote to reviewer: I have added new code to apply setting content type fields when creating a new content instance.
Comment #10
luxpaparazzi commentedI suppose your GIT-URL should be http://git.drupal.org/sandbox/rjohnson42/1278058.git
You should remove empty functions
You should use the database extraction layor correctly, please read http://drupal.org/writing-secure-code
see: "never concatenate data directly into SQL queries"
you should use correct identations of only two spaces per identation-level (also check coder-module):
Comment #11
klausiTagging.
Also, you have not listed any reviews of other project applications in your issue summary as strongly recommended here: http://drupal.org/node/1011698
Comment #12
rjohnson42 commentedI have fixed all the problems noted in comment #10. I have also updated the module documentation to match the current code.
I will investigate the reviews mentioned in comment #11 and see if I contribute.
Comment #13
anwar_maxReview of the 7.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
Manual Review:
1)"module_invoke_all('node_bulkpub_edit'": if your module invokes its own hooks your should document them in an *.api.php file. See http://drupal.org/node/161085#api_php
Comment #14
rjohnson42 commentedI have fixed items noted in Issue #13.
I am beginning to think the review process is an infinite loop that goes like this:
1. Run Drupal Code Sniffer
2. Fix problems the sniffer finds.
3. Set status to "needs review".
4. Time elapses and the Code Sniffer module adds new style checks.
5. Next reviewer runs Code Sniffer and creates a new issue for me with new check issues noted.
6. Back to step 1.
Comment #15
klausiMinor coding standard problems should not result in "needs work", the problems mentioned in comment #13 are surely no application blockers.
You can easily exit this infinite loop by getting a review bonus.
Comment #16
miksan commented1) bulkpub.module, line 954:
In the doc block the function the first param ($node) is expected to be an object.
So why typecast the variable if you are sure it is an object?
If you are uncertain of that the function receives an object you should check the variable with is_object or similar.
2) bulkpub.module, line 1198:
the function: bulkpub_validate_user returns either an object or a string and therefore the @return tag type in the docblock should be 'mixed' instead of 'array'. It seems like the function never would return an array by the way, correct me if I am wrong. :) When you write mixed you can start the description with object/string to specify what 'mixed' covers.
So instead of:
You could write:
3) bulkpub.module, line 1036:
the line exceeds 80 characters and gets difficult to read.
instead of:
try:
Comment #17
rjohnson42 commentedI have made changes to address issue #16.
Comment #18
cubeinspire commentedHi :-)
1. I think that you have a licence issue here. You state at www.drupalinfo.info documentation page that this module is released as CC v3, but contributed modules are under GPL v2. You should update this information on your website copyright information to avoid confusion.
2. There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
3. bulkpub_new_book() should check if $node is false before calling book_node_insert and return false/error message. Actually it returns an empty xml structure instead when the node id doesn't exists.
4. bulkpub_delete_image() is deleting the files with a call to file_unmanaged_delete($file);
Is this working correctly if the file is registered inside the files table ? It won't be better if this function checks first if the file has an fid and if it does then delete it using file_delete() instead ?
5. On bulkpub_validate_user() the function user_authenticate() is directly called without any anti flood filter, that could be a security problem. This could be improved checking the configuration with flood_is_allowed().
There is an interesting example on: http://api.drupal.org/api/drupal/modules!user!user.module/function/user_login_authenticate_validate/7
6. On line 613 bulkpub_new_page() the function set language as LANGUAGE_NONE. This is correct on www.ditainfo.info but other websites with internationalization would have a big problem with that. It could be interesting to add the language as an aditional parameter with a default value to LANGUAGE_NONE.
Drupal as a Service ! That's really cool !
Hope to see this released soon.
Comment #19
rjohnson42 commentedAll the items in Issue #18 have been addressed. The documentation has been updated to reflect the changes. Flooding is now enforced and language can be set for new and edit page calls.
Comment #20
davidwbarratt commentedHey rjohnson42,
Interesting Module!
I ran your code through the automated reviewer and it returned these results:
http://ventral.org/pareview/httpgitdrupalorgsandboxrjohnson421278058git
If you can fix these few errors, it looks pretty good to me.
Also, I noticed that my code editor was breaking somewhere and I found the issue:
In blukpub.module on Line 1414 you have this:
What if you wrapped the code in a single quote ( ' ) character?
That seems to fix the code editor and is a better PHP and Drupal best practice. Also, you should always end print statements with a semicolon ";". I know the semicolon is optional in this instance, but it's in accordence with Drupal's coding standards: http://drupal.org/coding-standards#semicolon
----------------
I know a lot of these coding standards can be a real pain in the butt, but they help people test and contribute to your code immensity when they can expect the code to be consistent with all other Drupal projects.
I hope the review process goes well for you!
thanks!
Comment #21
rjohnson42 commentedI made all the changes recommended in Issue#20. Ventral gives the code a clean bill of health.
Comment #22
davidwbarratt commentedLooks good to me!
thanks!
Comment #23
jthorson commentedGlancing through the code, it certainly takes some understanding of how Drupal works to write such a module. :)
A quick scan didn't reveal any obvious showstoppers. I have some minor concerns around sanitization of input being returned to the xmlrpc calls; but given that we preach 'never trust the other end of the connection', the onus falls on the consumer to validate before outputting.
That said, and based on #22 ...
Thanks for your contribution, rjohnson42!
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 #24
bdupls commentedI just wanted to comment that this module along with the Python script from www.ditainfo.info (converting DITA) worked with ease.
This module should be published there is a LOT of sites that could use this.