Play a game instead of solving captchas http://areyouahuman.com/ This is an alternative to Captcha and ReCaptcha

The link to the sandbox is http://drupal.org/sandbox/valeriod/1402602

This is for Drupal 6, Drupal 7 will follow shortly.

Add or reply to comments on the home page at http://vdpdev-drupal.ab1k.us/ to see how it works

CommentFileSizeAuthor
#4 coder_review.txt679 bytesasifnoor

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master 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.

valeriod’s picture

Drupal 7 branch is ready for review.

misc’s picture

Status: Needs work » Needs review
asifnoor’s picture

Status: Needs review » Needs work
StatusFileSize
new679 bytes

Manual review of 7.x-1.x branch

1. In your .inc files use check_plain function whenever you are accessing variable_get functions to prevent cross site scripting attacks.

2. use translate t functions for menu descriptions in your module file to support localization

3. in your .module file use check_url function to avoid xss attacks.

Coder Review

Attached is the coder review.

valeriod’s picture

Greetings: I have done the changes per 1,2 and 3. For what is concerned the coder-review.txt I'm definitely missing something here.

This is the code it is complaining about:

drupal_set_message(st('You can now <a href="!ayah_admin">configure the AYAH module</a> for your site.',
    array('!ayah_admin' => url('admin/user/ayah'))), 'status');

and

drupal_set_message(st('Note that the AYAH module disables <a href="!performance_admin">page caching</a> of pages that include a AYAH game.',
      array('!performance_admin' => url('admin/settings/performance'))), 'warning');

There are no variables, what am I missing?

valeriod’s picture

Also I just removed the check_plain from ayah.inc per your remark #1. I wasn't really thinking about it when I added it. This is a programmatically set variable that is an array so check_plain will generate an error. FYI: the module captcha does exactly the same thing.

valeriod’s picture

Priority: Normal » Major

Please can I have some feedback on my post of two weeks ago? I really need to have this resolved. Thanks a lot.

michelle’s picture

I think the "variable" it's referring to is url('admin/user/ayah') which gets substituted in for !performance_admin. It just says, "potential problem" not that it's broken. According to http://api.drupal.org/api/drupal/includes!install.inc/function/st/7 the st function sanitizes so I don't see where there's an issue...

Michelle

klausi’s picture

You need to set the status to "needs review" if you want to get a review. The response time for a review is now approaching 4 weeks. Get a review bonus and we will come back to your application sooner.

valeriod’s picture

Priority: Major » Normal
Status: Needs work » Needs review

Thanks a lot!

Will be more than happy to pitch in, stay tuned :-)

valeriod’s picture

Issue tags: +PAreview: review bonus

This should be the correct tag

mdespeuilles’s picture

Status: Needs review » Needs work

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. Get a review bonus and we will come back to your application sooner.

Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards

sites/all/modules/pareview_temp/./test_candidate/ayah.install:
 +60: [critical] Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar.

Status Messages:
 Coder found 3 projects, 3 files, 1 critical warnings, 0 warnings were flagged to be ignored

FILE: ...upal-7-pareview/sites/all/modules/pareview_temp/test_candidate/ayah.inc
--------------------------------------------------------------------------------
FOUND 14 ERROR(S) AFFECTING 13 LINE(S)
--------------------------------------------------------------------------------
  11 | ERROR | Missing parameter type at position 1
  13 | ERROR | Missing parameter type at position 2
  15 | ERROR | Missing parameter type at position 3
  26 | ERROR | Expected "}\nelse {\n"; found "}\n\nelse{\n"
  36 | ERROR | Missing parameter type at position 1
  56 | ERROR | Missing parameter type at position 1
  58 | ERROR | Missing parameter type at position 2
 121 | ERROR | Missing parameter type at position 1
 158 | ERROR | Missing parameter type at position 1
 160 | ERROR | Missing parameter type at position 2
 171 | ERROR | Last parameter comment requires a blank newline after it
 171 | ERROR | Missing parameter type at position 3
 242 | ERROR | Expected "}\nelse {\n"; found "}\n\nelse{\n"
 267 | ERROR | Expected "}\nelse {\n"; found "}\n\nelse{\n"
--------------------------------------------------------------------------------

Source: http://ventral.org/pareview - PAReview.sh online service

klausi’s picture

Status: Needs work » Needs review

No manual review given, so the status is "needs review ".

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus

manual review of the 7.x-1.x branch:

  • project page is a bit short, see http://drupal.org/node/997024
  • ayah_admin_settings(): you could use system_settings_form() here.
  • "confirm_form($form, check_plain($message), 'admin/user/ayah', '', check_plain($yes));": no need to use check_plain() here, as both variables are sanitized already.
  • ayah_admin_settings_validate(): the TODO should not be done here, checking for cURL should go to hook_requirements().
  • Are you sure that you need cURL? Why can't you use drupal_http_request()?
  • _ayah_doCall(): you should use watchdog() instead of error_log().
  • _ayah_doCall(): gloabl function names should not use camel case naming.
  • _ayah_doCall(): use drupal_json_decode() instead of json_decode().
  • "array_key_exists($form_id, $placement_map)": isset() is shorter and easier to read. Also elsewhere.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

mdespeuilles’s picture

Hi,
In your module file in the theme_ayah() function you have :
return "<div id='AYAH'></div><script src='" . $url . "'></script>";

Why you don't use drupal_add_js() ? :

drupal_add_js($url, 'external');
return "<div id='AYAH'></div>";

Your script will be in the header section.

tomotomo’s picture

Cool. I would like to see this for D6. Any update?

heine’s picture

drupal_goto($_GET['q']);

This is an open redirect when the login block is shown on 404 pages. You need to check whether $_GET['q'] is an absolute URL via the (misnamed) function url_is_external. If so, redirect to the frontpage.

jibus’s picture

Very interest in this module, hope it will get release some day =)

klausi’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.