Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Oct 2015 at 14:18 UTC
Updated:
5 Jan 2016 at 19:24 UTC
Jump to comment: Most recent
Comments
Comment #2
rahulbaisanemca commentedComment #3
rahulbaisanemca commentedComment #4
rahulbaisanemca commentedComment #5
PA robot commentedWe 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 #6
rahulbaisanemca commentedComment #7
rahulbaisanemca commentedComment #8
rahulbaisanemca commentedComment #9
rahulbaisanemca commentedComment #10
rahulbaisanemca commentedComment #11
subhojit777Thanks :) Add this tag "PAReview: review bonus" to your project application, you are eligible for the high priority list.
extra_body_classes.install:- Use
\Drupal::service('config.factory')->getEditable('extra_body_classes_date')->delete();. See https://www.drupal.org/node/2183531, https://www.drupal.org/node/1809490extra_body_classes.module:- I guess you checking whether current user is admin. You can do it using this:
Apart from the changes.. I am a bit confused about the scope of this module. What this module does is add some classes to
bodytag of page markup - if the user is admin. Some other observations:bodymarkup. If the current page is admin related, I guess Drupal already provides this feature.Comment #12
subhojit777Comment #13
ajitsComment #14
rahulbaisanemca commentedComment #15
rahulbaisanemca commentedComment #16
rahulbaisanemca commentedComment #17
rahulbaisanemca commentedHi Subhojit, Thanks for reviewing my module.
I have come up with all suggestion u have suggested here... hope that correct (finger crossed).
1) extra_body_classes.install file is updated with given suggestion.
2) In extra_body_classes.module file i am checking whether current path comes under admin section, if not then only add extra classes.
for example: if path is /test then extra body class should be implement.
but if path is within admin section like /admin/modules then extra body classes should not implement.
3) There is very wide scope for this module there is lot of developer/site-builder/Themer right out there who wan't to date-based/current user role based/custom classes are needed.
4) according to your suggestion, now administrator can be able to add custom class to body tag
Comment #18
rahulbaisanemca commentedComment #19
subhojit777- Consider adding comment in
validateForm()for what you are trying to achieve.- Change comment in
submitForm()to@inheritdocComment #20
rahulbaisanemca commentedHi Subhojit,
Thanks for giving me ur time,
According to your suggestion, i have updated comments
1) comment in validateForm()
2) Change comment in submitForm() to @inheritdoc
Comment #21
Sumit kumar commentedHi @rahulbaisanemca
Thanks for your contribution
Can you show help through Readme file,right now its coming from function that you have create in file.
Thanks
Comment #22
rahulbaisanemca commentedHi Sumit kumar,
Thanks for your review and time,
Here i am consider that u want me to write help into this format https://www.drupal.org/node/161085, like we write in d7.
For this i gone through core modules and example module and check how they have implemented hook_help.
They have implemented in a same way that i have implemented it.
May be i am not in sink with you, if so please provide, reference how would you like me to implement hook_help.
Comment #23
Sumit kumar commentedHi @rahulbaisanemca
you can add file path in hook_help().
$filepath = dirname(__FILE__) . '/README.md';
Comment #24
subhojit777Thanks @Sumit pointing that out. @rahulbaisanemca I totally missed out. @Sumit is right, your
hook_help()needs to be updated. I am not sure whether this module's help would render properly, there may be escaping problem.This is not the right way to render content for module help. Loading README file inside
hook_help()will result in not-translated module help. You should refer webform module help. Also your module's help should focus on the purpose, installation and way of working of the module, credits should only be inside README.Comment #25
rahulbaisanemca commentedHi @Sumit and @Subhojit, I have updated hook_help and README.txt, Now all help text are written in t(), also now help is focus on Introduction, installation and how to use this module. Current maintainers: and Supporting Organisation are remove from help and make available only in README.txt
Comment #26
rahulbaisanemca commentedComment #27
subhojit777I am not sure whether this is properly rendered as link. Have you checked the help markup? You can use FormattableMarkup for rendering this. This is not a security issue, so I am not moving this to "needs work".
Comment #28
rahulbaisanemca commented@subhojit, Thanks for pointing this issue, i have come up with updated hook_help code can u please review it.
Comment #29
subhojit777Reviewed the code once again, didn't found any security concerns. I hope that this module comes up with more functionalities in future. Thanks for your contribution!
Comment #30
rahulbaisanemca commentedSure subhojit, soon i will add new functionality to this module.
Thanks for ur time and review.
Comment #31
FreeAndEasy commentedAutomated Review
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
Manual Review
Follows.
This review uses the Project Application Review Template.
Comment #32
klausi@FreeAndEasy: module duplication is bad, but is not an application blocker. Looks like you did not find any problems in the code and this should stay RTBC?
Comment #33
FreeAndEasy commented@klausi: Jupp, other than maybe project complexity I have no further objections. I think the functionality this module provides is also already largely provided by Drupals Twig templates. One could easily use twigs date function in the html.html.twig template to achieve the same thing. A "logged_in" variable is also provided, the only thing missing is the role class (which could also be implemented via a theme hook).
Comment #34
naveenvalechaReview of the 8.x-1.x branch (commit 8a28284):
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.
\Drupal::getContainer()->get('config.factory')$this->configFactory.extra_body_classes_preprocess_html : we are passing the classes array without sanitizing it. so please sanitize it before adding.the class names was unsanitized and yeah the classes are being validated in validate form function with the expression /^[a-zA-Z0-9,]*$/Please fix the above and then do another 3 reviews to take another review bonus to speedup the process. Thanks for your patience involved in the project applications process.
Comment #35
rahulbaisanemca commentedHi Naveen,
Thanks for your kind review, but i have just done this,
http://pareview.sh/pareview/httpgitdrupalorgsandboxrahulbaisanemca258314...
and it looks good for me can you please provide me link where you have tested this.
Thanks,
Rahul Baisane.
Comment #36
klausiSince the class name is validated in ExtraBodyClassesConfigForm I don't see how an attacker could use that to perform an XSS attack. And user roles can only be added by users that must be trusted anyway, so also the role name does not look like an attack vector to me. Maybe I'm missing something, could you post exploit details how this could be leveraged? Removing the security tag in the meantime.
Comment #37
rahulbaisanemca commentedThanks klausi for this details.
Comment #38
naveenvalechaKlausi,
Yeah Its fine with the class name. I did not tried to exploit it but the class names was unsanitized and yeah the classes are being validated with the expression /^[a-zA-Z0-9,]*$/
updated the comment above.
Comment #39
naveenvalechaNot any blocker above. Assigning to klausi to give it a final review when he will get time.
Comment #40
naveenvalechaComment #41
rahulbaisanemca commentedThanks @Naveen for your kind review.
Comment #42
klausiThe other points mentioned by Naveen are still valid, so make sure to check those.
Otherwise looks good to me, so ...
Thanks for your contribution, rahulbaisanemca!
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.
Comment #43
rahulbaisanemca commentedThanks klausi, This movement i am waiting for so long, finally...my module get accepted by community.
Feeling happy.
Thanks to Ajit for teaching me how to contribute, thanks for showing trust on me.
Thanks to Naveen for taking out time from your busy schedule and pushing this module one step further.
Thanks to Sumit kumar and FreeAndEasy for your time and review.
and Finally Big Thanks to Subhojit who is not only excellent Drupal Developer but also a wonderful human being.