- Module name: HappyCaptcha for Drupal 7
- Project page: http://drupal.org/node/1536250
- Sandbox page: http://drupal.org/sandbox/alex.yang/1522380
- Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/alex.yang/1522380.git HappyCaptcha
- Drupal version: Drupal 7 only
Uses the HappyCaptcha web service to improve the CAPTCHA system.
HappyCaptcha is a free CAPTCHA service which developed on Hint-Challenge-Response approach*. We are focused on enhancing the user experience on your website.
Captcha services today are making life difficult for the user. Instead of asking the user to input difficult and boring text, HappyCaptcha offers a cute and friendly user experience.
Hint-Challenge-Response Approach
Alternative developments in more sophisticated CAPTCHA techniques involve asking intelligent questions regarding the contents of a picture. With this technique, a picture (the "hint") is displayed with a question (the "challenge") to solicit a "response" from the user. For example, the picture may be a photograph of a parking lot with a number of cars and motorcycles. The challenge is presented as the question, "How many motorcycles in the parking lot?” This approach relies on the intelligence of a real person to both recognize the objects in the picture and understand the question that is being asked. Although a relatively easy task for the average person, this is much more difficult to implement as a computer algorithm given the wide range of possible objects and questions.
- INSTALLATION
Extract the HappyCaptcha module to your local favourite
modules directory (sites/all/modules). - CONFIGURATION
- Enable HappyCaptcha and CAPTCHA modules in:
admin/build/modules - You'll now find a HappyCaptcha tab in the CAPTCHA
administration page available at:
admin/config/people/captcha/happycaptcha - Visit the Captcha administration page and set where you
want the HappyCaptcha form to be presented:
admin/user/captcha
- Enable HappyCaptcha and CAPTCHA modules in:
For more information and live demo, please visit Happy Captcha
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | happycaptcha.png | 158.87 KB | d2ev |
Comments
Comment #1
jack_tux commentedHi
Your code is in the master branch. The master branch should be clean http://drupal.org/node/1127732
Regards,
jack_tux
Comment #2
patrickd commentedAs pointed out above, 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.
As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow tips for a great project page. Also make sure your README.txt follows the guidelines for in-project documentation.
Remove the license file as well as the timestamp, version and project keys from your info, they will be added automatically.
while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxalexyang1522380git
We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.
regards
Comment #3
alex.yang commentedI made change accordingly, should I re-submit for review or just wait?
Comment #4
alex.yang commentedthanks jack, I created a 7.x-1.x branch but not sure if I'm doing it right
Comment #5
patrickd commentedLooks good, the only thing left for now is the project page, please give some more information on it (installation instruct, usage, features..)
Comment #6
d2ev commentedi have install this module with Captcha module. This module is working perfectly.
It would be nice if you could add a setting for hint image where we have an option to select the display image style. Now the images is showing in fixed size of 350x200.
Comment #7
alex.yang commentedD2ev,
you can customize the appearance of HappyCaptcha by specific your own CSS file location (under HappyCaptcha tab of "Home » Administration » Configuration » People » CAPTCHA" )
Alex
Comment #8
scot.hubbard commentedHi Alex,
I have just finished reviewing your module and here are my findings:
There are no license issues with this module as there are no third party files included.
Coding standards are generally good and an automated review did not find any issues.
You appear to have an empty function in happycaptcha.admin.inc (at the bottom of the file there is a validation function with no code in it).
As you have a configuration page, have you considered adding:
configure = admin/config/people/captcha/happycaptchato your .info file? This would make the config page link available under the admin/modules/list page.
Other than updating your project page with more info, I really don't see any other problems with this module.
It's RTBC for me.
Comment #9
alex.yang commentedScot,
I updated .info accordingly, removed empty function in .admin.inc, and add some content in project page (not sure if i'm doing it right).
thank you very much for the effort and great advice
Alex
Comment #9.0
alex.yang commentedupdate project page
Comment #10
patrickd commentedYou can use #prefix for prefixing the field with '#' (maybe also #element_validate for validating whether it's an 6/3 char long string with letters from A-F)
fsockopen("happycaptcha.com", 80);You should check whether it makes sense to put a custom timeout parameter here, otherwise the config timeout will be chosen ($timeout = ini_get("default_socket_timeout");) so it's blocking the site until the timeout is reached when happycaptcha is not reachable.$html = "<script>document.write('<script type=\"text/javascript\" src=\"http://happycaptcha.com/happycaptcha.js.php?fg=$happycaptcha_challenge_fg&bg=$happycaptcha_challenge_bg&r=' + Math.random() + '\"></sc' + 'ript>');</script>";$happycaptcha_challenge_fg, $happycaptcha_challenge_bg: These variables are not filtered before they're printed out and therefore this is an XSS security issue. please add check_plain() here.
Comment #10.0
patrickd commentedadded project page
Comment #10.1
alex.yang commentedupdate
Comment #11
alex.yang commentedthank you patrick, i have made change accordingly
Comment #12
patrickd commentedgreat, don't forget to switch back to needs review
Comment #13
alex.yang commentedComment #14
exratione commentedThis is outside the scope of review for security, etc, but seems worth noting. Where you are doing this:
This only tests whether the webserver is listening on port 80 - it says nothing about whether the service is functioning. Wouldn't it be better to have a publicly available alive service that could be called through a higher level function? e.g.:
You could then provide a response that more accurately describes whether or not the happy captch service is available.
---
It would also be good to allow the user to set the timeout on the above check as a variable in the admin settings form - 5 seconds is a long time to wait on a page component to decide not to load if its service isn't running.
---
Security: this composite URL in the Javascript should be run through check_url(), since it's assembled from parts:
You do run a regex check on these included values, but you should still use check_url() on the whole thing as well as check_plain() on the included parts.
---
Which leads to the regex check on the color, that actually lets you enter anything provided it's postfixed with a color code.
So if you want to force six character color codes absolutely, that should be:
Does it have to be 6 character hex, or could you let users enter 3 character codes and color codes also?
---
You might look into the jquery_colorpicker module, which would be a nice and easy addition to the admin UI here - have the user use a UI to pick the color and then not have to worry about making them think about codes. It's pretty slick.
---
You might also look at Cache External Files with regard to using the external CSS file for the captcha - that may help with some of the slowness that tends to come with adding third party items to page.
---
A trivial note - changes nothing in your implementation. 'arguments' changed to 'variables' in D7:
Should be:
---
Aside from that, it looks good.
Comment #15
exratione commentedComment #16
alex.yang commentedchange made accordingly, thank you exratione
Comment #17
exratione commentedYou'll need to push whatever changes you made to the drupal.org repository - I'm not seeing them.
Comment #18
alex.yang commentedoh i forget push back, thank you exratione
Comment #19
exratione commentedComment #20
rogical commentedManual review:
You will neeed: refer http://drupal.org/node/1011698
Comment #21
rogical commentedComment #21.0
rogical commentedupdate
Comment #21.1
klausiadded sanbox link
Comment #22
alex.yang commentedam i doing it right? not sure what is "project page" , where to specify drupal version and git link
Comment #23
exratione commentedAssuming rogical is talking about the post at the head of this thread, you might look at my current project submission as an example of the form:
https://drupal.org/node/1488292
Comment #23.0
exratione commentedupdate
Comment #24
alex.yang commentedthank you very much exratione
Comment #25
dev001 commentedManual review - issues in happycaptcha.module file:
1. You don't have description for the hooks you created, follow the link below and add description.
http://drupal.org/node/1354#hookimpl
2. Why are you using URL encode to construct URL - Line 119?
Comment #26
alex.yang commentedcomments have been update. encode parameters to make sure safe HTTP request.
Comment #27
cwithout commentedTested it and it was working well. Tested the custom CSS file, and that worked.
Found just a couple of minor things.
In happycaptcha.module your hook_help, you have a couple incorrect links.
admin/user/captcha/happycaptchashould beadmin/config/people/captcha/happycaptcha.admin/user/captchashould beadmin/config/peopleline 54 in happycaptcha.module, the comment should say hook_permission() rather than hook_perm().
Comment #28
alex.yang commentedupdated, thank you cristinawithout
Comment #29
serjas commentedthere is still contents in master branch as per http://ventral.org/pareview/httpgitdrupalorgsandboxalexyang1522380git ..try delete master branch , here is the instruction http://drupal.org/node/1127732
manual review
installed the module and tested working in registration form .. working fine :)
Comment #30
serjas commentedComment #31
patrickd commentedThere is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 .
Delete master branch:
I'd like to have a screenshot on the project page.
return captcha_captcha('generate', 'Math', $args);
it's probably not the best solution to always fall back to the math captcha,
maybe rather add a new option as select box and let the user choose which captcha to fall back to.
I think better here would be:
same in your happycaptcha_captcha_validation(), also there you can use url()'s query feature
before you try to get the ->data of the resonse object you should make sure that ->error does not exist.
But nothing serious, just suggestions, therefore
Thanks for your contribution!
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 #32.0
(not verified) commentedupdate git