Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Jan 2013 at 17:07 UTC
Updated:
4 Jan 2014 at 02:42 UTC
Jump to comment: Most recent
Comments
Comment #1
jooplaan commentedcleanup code and changed the default branch to:
git clone --recursive --branch 7.x-1.x jooplaan@git.drupal.org:sandbox/jooplaan/1877392.git notificare
Comment #2
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 #2.0
klausiUpdated link for git clone, to set it to new default branch.
Comment #3
monymirzaHi,
notificare.module
line #198
Avoid backslash escaping in translatable strings when possible, use "" quotes instead.
>> Optionally, add hook_help in module.
Comment #4
kasperg commentedNice module. Notificare seems like an interesting service and the Rules integration looks very good!
Apart from the comment in #3, all the mandatory stuff checks out.
I have looked through the code and have some questions and comments you may want to look into:
notificare_notificare_get_notificare_record(), which is not defined anywhere. I guess it should benotificare_get_notificare_record()?check_plain()called on arguments tonotificare_respond()andnotificare_access()? It seems unnecessary.drupal_add_http_header()to send the error status instead ofheader(). Also I did not understand the header message Error: Comment already approved. 403 seems to be a more appropriate error code than 400. The syntax of the request is valid even though it is for a record which has already been changed.$updated_recordvariable is not used anywhere. Delete it for clarity.notificare_create_token()could be simplyfied and optimized usings Drupals owndrupal_random_bytes().notificare_make_payload()?nid. The name seems misleading as it can also contain comment ids. You could use entity_type/entity_id as in the field tablesidas the primary key. That field is currently not used in any of the queries in the module. At least consider adding an index for thetokenfield.I hope these comments can help improve this module and look forward to seing it develop.
Cheers!
Comment #5
jooplaan commentedThank you for reviewing this new module. The feedback is very helpful.
Fixed the warning from the automated code syntax review mentioned in #3
The documentation for the http://notifica.re service is non existant. They are working on it. I received very good help through email from the creators of this service. And examples how to work with their API. As for the 400 error, it was asked to implement it this way.
In the README.txt and on the module page on drupal.org it is documented how to use this module.
Comment #5.0
jooplaan commentedfixed typo
Comment #5.1
jooplaan commentedAdd link to project just reviewed
Comment #6
hhhc commentedHello,
some comments:
* The documentation needs an update.
After registration to their website you need to go to "Services" and then select "Webhooks" "create yours". The dashboard is just empty and without functionality for the time being (they are working on it).
* Configuration of module worked as described
* Trying to use it with Rules raises some questions: I tried to setup a rule that sends me a notification whenever a user is logged in.
When configuring the action I am asked to enter "Subject", "Message" and a Node? This is a mandatory field so I cannot continue testing.
Any suggestions?
Comment #7
jooplaan commentedHi and thanks for testing this module!
* Trying to use it with Rules raises some questions: I tried to setup a rule that sends me a notification whenever a user is logged in.
When configuring the action I am asked to enter "Subject", "Message" and a Node? This is a mandatory field so I cannot continue testing.
If it is not clear it may be phrased differently, or a description added.
The Subject is the notification you will see in the app.
The message is what you see when you open the notification in the app. You can use tokens here.
The idea was, using the Rules module, to make the subject and message tailered to the needs of the site.
Comment #8
hhhc commentedHi,
subject and message are clear. If Rules sets the context to "user created" or "comment added" etc then I have this context available in the body and can set whatever I need in those 2 fields. But what is the 3rd option for?
Comment #9
piouPiouM commentedHello,
I have some suggestions and manual code review:
service_urlshould be prefixed with the module name (notificare_service_url) to avoid conflict with another module. The current name is too generic.notificare_send_notificare_message()by testing the validity of the Notificare Service URL provided by the user.notificare.module:14, why uset()with an empty string? That occurs many calls for nothing.notificare.module:170-171, you set 2 temporary variables for nothing since you accessed only once and that the keys of the$recordarray are explicit enough to be understood.notificare.module:198-200, the description should be in one piece for easy translation. Here, the concatenation breaks the ability to translate the string from right to left.I hope that these comments will be useful.
Comment #10
jooplaan commentedHi piouPiouM,
Thanks for your review and comments!
Comment #11
klausiSorry for the delay. Make sure to review more project applications and complete your review bonus and this will get finished faster.
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. You have to get a review bonus to get a review from me.
manual review:
Comment #12
jooplaan commentedThanks for the review.. The code styling issue is fixed and I have removed all functionalities that invoked the security issue you mentioned.
notificare_respond(): do not use header(), use drupal_add_http_header() instead.header no longer usednotificare_access(): why do you use check_plain() here, you are not printing anything to the user? Make sure to read http://drupal.org/node/28984 again.All calls removed that changed content.notificare_respond(): "header('Error: Comment already approved');": that message is only correct for one special case?No longer usednotificare_access(): the access protection is too weak. It might take a long time to try out all combinations of characters, but since the token never changes the attacker has all time she needs. I assume that the user has to follow the callbacks anyway to execute the action, so why don't you use the usual permission checks? This is definitely a security issue.No longer used."watchdog('notficare',": typo in the module name.Fixed.Comment #13
sreynen commentedComment #14
jcaustin98 commentedReview
Comment #15
jcaustin98 commentedCode looks good.
Followed third party service set up in README.txt (NOTE: URL has change to app.notifica.re, would be nice to update).
Tested it on simplytest.me, third party service showed that the message was sent.
Comment #16
jooplaan commentedThanks for reviewing. The README.txt and the project page info updated with the new URL of the third party service.
Comment #17
kscheirerLooks good, no security issues found in the module - though the service seems to not require any login or authentification, which seems odd.
Thanks for your contribution, jooplaan!
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.
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #18
jooplaan commentedThanks indeed to all the reviewers of this project!
Comment #19.0
(not verified) commentedAdd another code review