The CSRF Protection module provides form_token for drupal forms to Anonymous users.

 git clone --branch 7.x-1.x https://git.drupal.org/sandbox/Tharick/2793647.git csrf_protection
cd csrf_protection 

Review

https://www.drupal.org/node/2805347#comment-11655073

Comments

Tharick created an issue. See original summary.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgsandboxTharick2793647git

We 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.

Sumit kumar’s picture

Category: Feature request » Task
Sumit kumar’s picture

Status: Needs work » Needs review
visabhishek’s picture

Issue summary: View changes
visabhishek’s picture

Status: Needs review » Needs work

Automated Review

Please fix Error reported By PAReview.sh:
http://pareview.sh/pareview/httpsgitdrupalorgsandboxtharick2793647git

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
No: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
No: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. (*) Please update the readme how can i use this module , so i am interested to review again..
  2. (+) Please currect the typo error on csrf_protection.info description for "fomrs"
  3. >

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

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.

Tharick’s picture

Status: Needs work » Needs review

Hey visabhishek,

I have fixed the PAReview issues and added README.txt as well.

Thanks for your interesting and you can do recheck now.

http://pareview.sh/pareview/httpsgitdrupalorgsandboxtharick2793647git

Tharick’s picture

Issue summary: View changes
Tharick’s picture

Issue summary: View changes
Sumit kumar’s picture

Hi @tharick thanks for your contribution please add some relevant content in help hook(). Other then it look great for me.

function csrf_protection_help($path, $arg) {
  switch ($path) {
    case 'admin/config/development/csrf_token':
      return '<p>' . t('Help content will be coming soon.') . '</p>';

    case 'admin/help#csrf_token':
      $output = '';
      $output .= '<p>' . t('Help content will be coming soon!') . '</p>';
      return $output;
  }
}
Sumit kumar’s picture

Status: Needs review » Needs work
Tharick’s picture

Status: Needs work » Needs review

Hi @sumit,

Thanks for your valuable info, I have updated help content, Kindly review.

web247’s picture

Status: Needs review » Needs work

Automated review returned no issues.

Here's my manual review:

Code long/complex enough for review
No: Does not follow the guidelines for project length and complexity. Although, the point of this project is rather simple and it accomplishes the task. Anyway, there are around 35 lines of code (I took hook_help out since this is common ground)

Coding style & Drupal API usage
(*) In .install you have this line core = "7.x.0" - this means your project can't be enabled via drush nor from admin modules page ("This version is not compatible with Drupal 7.x and should be replaced.")
(*) In hook_help you have 2 inexistent paths (admin/config/development/csrf_token and admin/help#csrf_token); I think the latter should read admin/help#csrf_protection (maybe the original name of the module was csrf_token)
The docblock for csrf_protection_form_alter() should read 'Implements hook_form_alter().'

I did some research on the subject and it seems that there are already some work being done. I suggest reading this articles:
https://www.drupal.org/node/2319205
https://www.drupal.org/node/1803712 (although it moved to D8

Also, take a look at seckit module (https://www.drupal.org/project/seckit). It implements an Origin header to help solve this issue. Maybe you can integrate your project into that one, since it serves a larger audience.

PA robot’s picture

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

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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