Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2014 at 08:48 UTC
Updated:
30 Jul 2015 at 15:44 UTC
Jump to comment: Most recent
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxtmgmt_xplanation23524...
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.
Comment #2
mathiasve commentedAll problems are now fixed.
FILE: /var/www/drupal-7-pareview/pareview_temp/tmgmt_xplanation.plugin.inc
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
665 | WARNING | Line exceeds 80 characters; contains 82 characters
--------------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/tmgmt_xplanation.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------
91 | WARNING | Only string literals should be passed to t() where possible
206 | WARNING | Only string literals should be passed to t() where possible
233 | WARNING | Only string literals should be passed to t() where possible
258 | WARNING | Only string literals should be passed to t() where possible
269 | WARNING | Only string literals should be passed to t() where possible
310 | WARNING | Only string literals should be passed to t() where possible
Comment #3
gunosov commentedHi Mathias,
Thank you for this module.
Automated Review
Coder Sniffer has found some issues with your code (please check the Drupal coding standards)
Manual Review
I suggest to replace this code:
read more: http://drupal.stackexchange.com/questions/49955/how-to-give-anonymous-us...
I suggest use function t() with placeholders. For example:
read more: https://www.drupal.org/node/322774
You forgot about the concatenation.
This review uses the Project Application Review Template.
Comment #4
gunosov commentedComment #5
mathiasve commentedI've implemented the changes.
Issues left
Comment #6
mathiasve commentedComment #7
gunosov commentedIt is security issues, because you not control to access
All is only my recomendations.
Comment #8
mathiasve commentedComment #9
mathiasve commentedThe access arguments are added now and the clone command is updated.
Comment #10
rzan commentedHello mathiasve,
I've taken a look at your module. Nice work. Please see my review below:
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
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
However, on line 41 it says "A visual review can not provided." Did you mean
"can not be provided?" This text was a bit unclear to me.
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. (+) filter_xss is being used on literal strings being passed to drupal_set_message. You don't need to sanitize these as you have written them yourself and they don't contain any HTML. They should be passed to the t() method instead.
tmgmt_xplanation.module lines 424, 431
tmgmt_xplanation.plugin.inc lines 917, 929, 949, 953, 959, 965, 971
2. (+) The t() method already sanitizes its arguments in the form of check_plain, so I think filter_xss is unnecessary here.
tmgmt_xplanation.module lines 41, 258, 269
3. Documentation typo: incomming should be incoming
tmgmt_xplanation.plugin.inc line 888
4. I see you are doing a manual decode of only five entities '<', '>', '&', '"', '''. Would the decode_entities method not work in this case? This is likely valid for your situation but I thought I would check.
tmgmt_xplanation.plugin.inc line 891
Comment #11
mathiasve commentedThank you Rzan for the feedback. The changes are now implemented and can be reviewed.
As for the last part about the entity decoding I would prefer to keep the current method instead of using the general decode_entities.
Even though decode_entities would work fine in this case it might become less clear when problems arise with unsupported text-formats which still have to be implemented.
Comment #12
rzan commentedHi mathiasve. You're most welcome. I looked over your changes and you're almost there. Your error and notice messages that you send out through drupal_set_message must all be wrapped in the t() method. This is not for sanitation purposes but allows those messages to be translated. You removed the filter_xss which is good, but it needed to be replaced with t().
This occurs on the following lines:
tmgmt_xplanation.module lines 424, 431
tmgmt_xplanation.plugin.inc lines 917, 929, 949, 953, 959, 965, 971
Comment #13
mathiasve commentedAll changes are now implemented.
I did put the 'filter_xss' again in tmgmt_xplanation.module at lines 91, 258, 269 as this would otherwise produce an error using the Code review module.
Comment #14
rzan commentedThe reason the Code review is producing an error in that case is because you are passing in variables to the t() method and making the code sniffer suspicious that your message is not sanitized.
At line 91, for example, you have:
form_error($element, filter_xss(t($validator_err_msg, $validator_err_msg_arr)));
But it would also be fine, and slightly more efficient, to use the following:
form_error($element, t('The %title needs to be after the current date!', array('%title' => $element['#title'])));
Your error code is sanitized either way, so this is a minor issue and shouldn't block your module from release. I do not see any other issues so I'm setting this to RTBC.
Comment #15
cweagansThanks for your contribution!
I updated your account so you can 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 stay 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.