Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jun 2015 at 20:47 UTC
Updated:
5 Aug 2015 at 21:54 UTC
Jump to comment: Most recent
Comments
Comment #1
mojiferousComment #2
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 #3
mojiferousComment #4
Farreres commentedThere seems to be some errors in the module as reported by pareview:
http://pareview.sh/pareview/httpgitdrupalorgsandboxmojiferous2480987git
Comment #5
mojiferousFixed the PAReview issues with the readme
Comment #6
temkin commentedAutomated Review
http://pareview.sh/pareview/httpgitdrupalorgsandboxmojiferous2480987git
Manual Review
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 #7
temkin commentedComment #8
naveenvalechaNice Module. you are near RTBC
Git errors:
Review of the 7.x-1.x branch (commit 1387216):
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 :
$db_name = 'sharpspring_webforms';This variable holds the name of table so can we make it more relevant like $table_name . Nice use of drupal_write_record. Line 238,239 : Don't do check_plain while saving the endpoint and base_uri to databasePlease take another review bonus for the next review.
Thanks!
Comment #9
mojiferousThanks naveenvalecha!
Set the default git branch
1. Removed .gitignore
2. Added some more information to the project page
3. Thank you!
4. Yes, added info to the project page as well
5. Done
6. Refactored
7. Done
8. Done
9. Unfortunately because of the way the SharpSpring Javascript API functions, using ['#attached']['js'] does not correctly register Webform submissions. Attaching via ['#suffix'] appears to be the best way for this to function correctly.
Comment #10
mojiferousComment #11
naveenvalechaThanks! for the changes.
Review of the 7.x-1.x branch (commit f989df6):
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:
Put these code in some helper function so that it can be reusable.
The first line should be the summary of the file.So make it simple like
'#description' => t("<p>Add unique tracking IDs to each webform on the site. For each webform you want to track, enter the form's endpoint ID as it appears in the unique tracking code. It should be formatted like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12).</p>"),It should be'#description' => '<p>' . t("Add unique tracking IDs to each webform on the site. For each webform you want to track, enter the form's endpoint ID as it appears in the unique tracking code. It should be formatted like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12).") . '</p>',Similarly do the same at other places.'#description' => t("The form's baseURI will appear in the tracking code as: <pre>__ss_noform.push(['baseURI', '<strong>https://app-XXXXXX.sharpspring.com/webforms/receivePostback/XXXXXXXX/</strong>']);</pre>"),Use placeholders in the t() function. See https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7 Please correct at other places too.After fixing this I'll love to RTBC this :)
Comment #12
mojiferousThanks again!
Fixed the documentation and t() issues, added a hook_help() and put query code into a helper function.
Comment #13
naveenvalechaReview of the 7.x-1.x branch (commit 71c8b05):
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 :
variable_get('sharpspring_domain')Specify the default value of the variable as well and pass it as second parameter.Code from sharpspring modulevariable_get('sharpspring_domain', 'koi-000000.sharpspring.com')This is not trustable, but i did not find any way to do some hack with this.Otherwise looks good to me.
Assigning to @mpdonadio to give it a final look if he has time.
Comment #14
mpdonadioAutomated Review
Review of the 7.x-1.x branch (commit 71c8b05):
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
(*) sharpspring_webforms_config_form, line 60, is XSS vulnerable. $webform->title needs to be run through check_plain().
(*) sharpspring_webforms_config_form() is vulnerable to node access bypass. Line 19 just queries the {webform} table. This should really be
a db_select that joins the node table and then does and ->addTag('node_access'). This is mitigated by the fact that users
need to have the 'administer sharpspring' permission. Or, define your own permission and use the 'restrict access' option in the
hook_permission.
sharpspring_webforms_schema() should have FK entries for documentation.
So every time you add a webform, you need to goto the config to enable it? Think about a better long term solution.
drupal_add_js() is deprecated. Use #attached.
Use NODE_PUBLISHED instead of 1 when checking node.status.
This was a pretty quick look after finding the two security problems...
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 #15
naveenvalechaOops I missed simple catch #14.1 and #14.2 :(
/me Very bad to review code in tonight
Comment #16
mojiferousThanks again for the great feedback and help everyone!
#14.1 - fixed
#14.2 - Changed to a node_load_multiple()
#14.3 - Added foreign key definition to schema
#14.4 - Adding a tab and form to the webform node edit form definitely would make a lot more sense. This will definitely be one of our first tasks!
#14.5 - fixed
Comment #17
mpdonadioAutomated Review
Review of the 7.x-1.x branch (commit 1b0ae08):
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
The XSS is fixed.
(*) node_load_multiple() is not sufficient to protect against access bypass. You need to ->addTag('node_access') w/ db_select(). See https://www.phase2technology.com/drupal-7-node-access-grants-locks-and-k...
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 #18
mojiferousFixed Code Smell and node access issues in one line. Thanks again mpdonadio!
Comment #19
mpdonadioI read `git diff 1b0ae08` and am satisfied.
Comment #20
mpdonadioThanks for your contribution, Mojiferous!
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.