Description
------------
Facebook random autopost is a simple module that allows you to publish random nodes automatically to a selected Facebook page at the specified hours/minutes using cron.

Project page
------------
https://www.drupal.org/sandbox/kawal/2837725

Git clone link
------------
git clone --branch 7.x-1.x https://git.drupal.org/sandbox/kawal/2837725.git fb_random_autopost

Manual reviews:
https://www.drupal.org/node/2830269#comment-11833067

Comments

kawal created an issue. See original summary.

PA robot’s picture

Issue summary: View changes

Fixed the git clone URL in the issue summary for non-maintainer users.

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.

kawal’s picture

Issue summary: View changes
kajalkiran’s picture

Hi Kawal,

I found the use case of your module interesting. However, found couple of issues as mentioned below :

Automated Review

Git errors:

Review of the 7.x-1.x branch (commit 9ffcdd7):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    
    FILE: /root/repos/pareviewsh/pareview_temp/README.txt
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    ----------------------------------------------------------------------
      4 | WARNING | Line exceeds 80 characters; contains 117 characters
     18 | WARNING | Line exceeds 80 characters; contains 213 characters
     23 | WARNING | Line exceeds 80 characters; contains 249 characters
     24 | WARNING | Line exceeds 80 characters; contains 110 characters
    ----------------------------------------------------------------------
    
    Time: 133ms; Memory: 8Mb
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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.
Git issue

Manual Review

Individual user account

Secure code

[ Yes: List of security issues identified.]

  • Configuration form Accepts malicious code like " < script >alert(1);< / script > " and then this script gets saved. Screenshot attached.
  • script issue

Coding style & Drupal API usage

List of identified issues:

  • *Security Issue at configuration form
  • Should handle exceptions if libraries not avaiable.

Recommendations for Application Issue

  • For .info file the name, description does not require " ".
  • Provide Similar Modules and how your module is different from others.
kajalkiran’s picture

Status: Needs review » Needs work
kawal’s picture

Hi Kajal,

Thank you for reviewing the module, but I don't agree with your "Security issue on configuration form".

Here's an explanation:
1. According to the drupal standards, the user inputted values should be stored as it is and should be sanitized only when displayed.
2. The form is using system_settings_form() which is a drupal core function and form submission is handled by it.
3. None of the values submitted are ever going to be displayed on the front-end to a user. All the parameters are used in the backend so the issues that you claimed doesn't look valid.
4. The only time these values are going to be displayed is on the form itself using "#default_value" property which is automatically sanitized by drupal FAPI.

Now "Should handle exceptions if libraries not available.":
1. It's already in place. Logs an error to the database. Not sure if you meant something else.

Changes done:
1. Readme.txt character count fixed.
2. Git default branch set.

Thanks!

kawal’s picture

Status: Needs work » Needs review
amaria’s picture

Status: Needs review » Reviewed & tested by the community

Automated Review

[Best practice issues identified by pareview.sh / drupalcs / coder. Review of the 7.x-1.x branch (commit c9c1658):

No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

Manual Review

Individual user account
Yes: Follows
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
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Does not follow the guidelines for in-project documentation and the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. (Recommendation) Although I didn't see duplication, it should be explicitly stated as such on the project page according to the guidelines.
  2. (+) Please provide a link to the Facebook SDK dependency, even if just to the github page.
  3. (+) Minimum requirements for documentation is to Provide help text in the Drupal UI. even if only to inline the README file.
  4. (+) Please follow the preferred format for README Listed at the bottom of README Template
  5. (Observation) As a follow up to the security violation comment, I see that form data is input to the database as-is using core settings. Any output of data from the database (via the report or settings form) uses the l() function or form API functions which validates output using check_plain where appropriate. So, all good.
  6. (+) When I tried to synchronize the first time, I got an error concerning no domains on the app. This error persisted even after clicking the close button and x. It did not go away until I added a domain to my FB app. This needs to be addressed before release.
  7. (Recommendation) It wasn't immediately clear to me what the option "Do not repeat posts in less than following number of days" meant. A description maybe containing an example would be helpful here.

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.

kawal’s picture

Hi amaria,

Thanks for the review.

The changes have been done. However, the issue "error concerning no domains on the app" is something that is on facebook side and I have no control over it.

Thanks,
Kawal Kohli

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution!

I will update your account so you can opt into security advisory coverage now.

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!

Thank you, 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 go the dedicated reviewer(s) as well.

avpaderno’s picture

kawal’s picture

Thank you for updating the account! I opted into security advisory coverage and released a full project.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.