Sandbox project page: http://drupal.org/sandbox/brunogoossens/1793476

I made this module to improve my staging process.
Reviews are welcome.

Other module reviews:
Node Reference Selector Widget : http://drupal.org/node/1437126#comment-6034962
Facebook Comments Administration: http://drupal.org/node/1535574#comment-6035054

CommentFileSizeAuthor
#6 Action name problem29.8 KBtomasbarej
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tdurren’s picture

Status: Needs review » Needs work

You need to fix comments

1) Admin deploy overeview. => overview
2) Tcheck if user can perform a deploy.
3) Tcheck if they have access to the edit admin page.
4) easely

Dont know whether watchdog messages should be wrapped with t()
e.g. watchdog('deploy', 'Backup files created');

Need PHPDoc for all functions

isset($form_state['values']['machine_name']) &&
!empty($form_state['values']['machine_name'])
!empty more strict so there is no need to use both

I installed the module and as soon as I opened the settings I got
Notice: Undefined variable: $rows in deploy_actions_admin_overview()
(line 75 of /var/www/tinypass.local/drupal7/modules/deploy_actions/deploy_actions.admin.inc).

brunogoossens’s picture

  • I changed the spelling errors.
  • Watchdog messages should not contain the t() function. For more information about how to use the watchdog function, you can read http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/watch...
  • !empty() is idd more restricting. It also checks if the variable exists so I don't need the isset() function anymore. It will not generate a notice when the array key is not present. Thx for the hint.
  • I fixed the notice when the table is empty.

Changed all the above issues. The module is ready for a new review.

brunogoossens’s picture

Status: Needs work » Needs review
monymirza’s picture

Status: Needs review » Needs work

Hi,

there is a little bit work required. Please fix errors and warnings listed here: http://ventral.org/pareview/httpgitdrupalorgsandboxbrunogoossens1793476git

Run coder module to check your code before pushing to git
(please check the Drupal coding standards)

brunogoossens’s picture

Status: Needs work » Needs review

Fixed the minor coder issues.
The module is ready for a full review.

tomasbarej’s picture

Status: Needs review » Needs work
FileSize
29.8 KB

Hi brunogoossens,

Really nice module, here is my feedback.

Automatic review: as you said no issues.

Manual review:

  • You have a typo on Deploy action settings page in URL to triggere the deploy
  • There could be a link on Module list to Deploy actions configuration, just add this line to .info file:

    configure = admin/config/system/deploy-actions

  • Module data storage: I see that actual action you store in variables table. But I found an issue when you use some special characters in action name, the setting form is not working for particular action (see attachment). You should add a Machine name field on settings on which you will save the data in variables table or prepare a custom storage for this actions data. Is see machine name field in code but it somehow doesn't display for me on the right of the name field.
brunogoossens’s picture

Status: Needs work » Needs review
  • Added the improvements suggested by tomasbarej.
    Also e-mail him about the deploy name problem because I can't reproduce it.
  • Added drush support for the module

The module is ready for a other full review.

klausi’s picture

We 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 :-)

klausi’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

Sorry for the delay. Make sure to review more project applications and get a review bonus and this will get finished faster.

manual review:

  1. "define('DEPLOY_ACTION_VARIABLE_PREFIX', 'deploy-actions-');": what is this needed for? Please add a comment.
  2. deploy_actions_access_edit(): why is this access callback needed and what protection does $needle give you? Please add a comment.
  3. "t('Deploying') . ' ' . $deploy['name'],": do not concatenate translatable strings, use placeholders with t() instead.
  4. "require_once drupal_get_path('module', 'deploy_actions') . '/deploy_actions.admin.inc';": no need to use drupal_get_path() as you are including files from your own module which you already know where they are. Use something like require_once 'mymodule.inc';
  5. Where is the additional password protection your are speaking of in the README?
  6. "Start deploy" is vulnerable to CSRF attacks. You need to use security tokens in action links, otherwise an attacker could trick you easily onto a malicious site that executes the deploy action on your behalf. Not sure this is fully exploitable with the drupal_goto() redirect, but you should fix it anyway. Please read http://drupal.org/node/178896 again.
PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Issue summary: View changes

Adding reviews