Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Feb 2012 at 14:38 UTC
Updated:
12 Sep 2022 at 20:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #0.0
muneer1st commentedDemo link added
Comment #1
maxtorete commentedHi muneer1st,
Have you tried to make the JS part with Drupal behaviours? This should help avoiding JS conflicts between different modules scripts. I have attached a file I wrote sometime ago for an old module so you can see how to convert from regular jQuery to Drupal behaviours.
Also, if your module requires a library, I think it should be placed on "sites/all/libraries/libraryfolder" so it can be shared with other modules, and then loaded on your module when needed. If you use libraries folder you can load the script with:
drupal_add_js(libraries_get_path('libraryfolder') . '/script.js');It also would be great if you use theme functions for HTML output code so other developers can theme it.
Greets!
Comment #2
muneer1st commentedThanks for your great comment Maxtorete,
I have modified my code accordingly.
* Drupal behaviors are added for JS startups.
* Library path is introduced in my module to accommodate jquery plugin and my core js file.
* Regarding the theme, I believe only CSS class which I have provided is enough for decoration purpose. What ever the HTML code I have included in the module is mandatory and should not be modified.
Thanks again for the useful comments.
Comment #3
operinko commentedFirst off, your master branch still has other files apart than the README.txt.
To remove those:
Secondly, PAReview.sh & Coder still show some issues, small ones but still:
http://ventral.org/pareview/httpgitdrupalorgsandboxmuneer1st1200280git
Then, there's an issue with the included javascripts.
Line 290:
drupal_add_js(libraries_get_path('ez_banner_rotator') . '/ez_banner_rotator');Seems to be missing .js from it.
Fix those first, then I'll look at testing it :)
Comment #4
operinko commentedComment #5
muneer1st commentedThank you operinko
I have completed the above steps. Hope it would be fine now.
please do the necessary.
Thanks.
Comment #6
operinko commentedManual review turned out nothing.
PAReview gives no errors.
As far as I'm concerned, reviewed and tested.
Comment #7
muneer1st commentedThank you @operinko!
How should I proceed from here now?
Comment #8
operinko commentedWait for someone higher up to grant you full project access to git.
Atleast, that's what I'm doing with my module :)
Comment #9
klausiWould you like to take part in the review bonus program? I personally only review/approve applications with a review bonus, but of course you can also wait for other git administrators to take a look at your code.
Comment #10
muneer1st commentedHope things are fine.
Ok. Lets wait and see for approval from an administrator.
Let me try with review bonus...
Comment #11
muneer1st commentedany updates are going on here?
Comment #12
klausiReview of the 7.x-1.x branch:
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. Get a review bonus and we will come back to your application sooner.
manual review:
Comment #13
muneer1st commentedOk thanks for the review. I will check it again and post back.
Comment #14
muneer1st commentedI need a help.
in the above error list from parview, it says
167 | ERROR | An operator statement must be followed by a single spaceplease look at the code below. I have broken line number 167 in to 2 lines. it is broken near the "?" character in the unary operator.
according to the error statement, where should I put the space? please guide.
Comment #14.0
muneer1st commentedDemo link updated
Comment #15
muneer1st commentedAll possible problems are solved and corrected. Please do the needful.
Comment #16
klausiRemoving review bonus tag, you have not done any manual review, you just posted the output of an automated review tool.
Comment #17
klausimanual review:
<script>alert('XSS');</script>I get a nasty javascript popup when the block is viewed. Make sure to read http://drupal.org/node/28984 again.We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project again, right away :-)
Comment #18
muneer1st commentedThanks for the comment, i will come back with a clean upload and reviews.
Comment #19
muneer1st commentedSorry for very late amendment. I was too much bz with the projects.
Thanks for all your comments @klausi. I have re-coded them all. Hope this would be fine. Please check when you get time.
Thank you!
Comment #20
thamba commentedHi,
I did a manual review of your 7.x-1.x branch. Nice work. Here are a few issues I found though:
Comment #21
udaksh commentedHi muneer1st,
There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
The git link you provide in your original post is the maintainer version, not the non-maintainer version. Please replace with
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/muneer1st/1200280.git ez_banner_rotator
Manual Review :
alert("XSS")- Usage of t() at line 183, 207, 252, 253 in file ez_banner_rotator.module is incorrect. Use placeholder for passing variables to t().
For example t() at line 207() could also result into XSS if $blocks_from_db[$delta]['title'] contains values like
. Try using t('@title', array('@title' =>$blocks_from_db[$delta]['title'])) .
- Commenting is inappropriate for most of the functions. Instead of writing "Implementation of function foo()". You should give a single line description of what is function is doing.
- Line 217 Describe the variable, what it contains.
- Line 295 - You are using a lot of HTML in return. Try to make your own theme and then apply this HTML through .tpl.php file.
- Line 345 . Try using check_plain($result1->title). You are getting title in $result1 and directly displaying it. Make sure that it does not contain any XSS by sanitizing its data.
- Line 392,393 - Same as 345.
Comment #22
muneer1st commentedThanks @thamba, @udaksh for the nice comments and feedbacks.
I have reviewed the suggestions and done the needful modification.
* Master branch was Removed.
* File permissions changed from 755 to 644
* Type mistakes corrected
* README file modified
* Download links explained for 3rd party libraries
* backup file removed
* usage of t(), corrected
* Missed XSS attack possible variables are protected with check_plain() function
Regarding the HTML used alongside the file, I dont want any one to give control over it with a template. The tags and attributes I have used on them are strictly related to the script with animate the banner. I have replied to a similar question in comment number #2 also. (http://drupal.org/node/1446848#comment-5636682).
I believe now the code is satisfyable and upto the standard.
Comment #23
hhhc commentedHi,
some comments:
Comment #24
muneer1st commentedDear hhhc,
Thanks for your evalution.
This is not responsive. This is inteded for D7. Basically Drupal 7 default theme and all are not responsive for mobile devices. It is good thing, Drupal 8 would be mobile friendly. May be in future release that is for D8 we might release or it might be an upgrade later.
I have come a long way fixing bugs and doing improvements to code since I launched this module in Drupal. No body commented this as a requirement. I hope this is not a requirement for the approval process.
Regarding the INSTALL file, some experts recommend it because ususally users are looking for INSTALL file when they are preparing to install. Having an INSTALL file and guiding the user to go through README to find out the installation steps, is a good idea when we have the instruction in README. It is just a guide for users. I hope it would not effect the approval process.
Comment #25
darrenwh commentedHi,
with your function ez_banner_rotator_generate_banner() its screaming out for a theme template
So implement hook_theme(); link it to a template and put the returned code in the template passing in the var
theme('thebanner',$image_dir);the same go's for the code in ez_banner_rotator_get_page_banner_blocks_view()
declare $block as an array in ez_banner_rotator_block_info()
declare $items as an array in ez_banner_rotator_menu()
Comment #26
mishradileep commentedYou pick very unique idea and I like your coding style, commenting, uses of core functionality and specially use of TRY-CATCH. I gone through your project issues and it look like you have already addressed most of the issues raised by community.
But I think you have to pay attention on below 2 points.
1. Separate HTML part from module file
know you have already addressed same point raised in #1 by maxtorete but what Drupal suggest is you should put it in separate TPL file. For now you feel that there is no need to modify the HTML structures but we may not estimate the requirement of module user.
2. Readme file having lot of typos
This is not a part of code review but readme file should be typo free as mostly users see only readme file to get your module working
Rest are okay for me.
Comment #27
mishradileep commentedYou pick very unique idea and I like your coding style, commenting, uses of core functionality and specially use of TRY-CATCH. I gone through your project issues and it look like you have already addressed most of the issues raised by community.
But I think you have to pay attention on below 2 points.
1. Separate HTML part from module file
know you have already addressed same point raised in #1 by maxtorete but what Drupal suggest is you should put it in separate TPL file. For now you feel that there is no need to modify the HTML structures but we may not estimate the requirement of module user.
2. Readme file having lot of typos
This is not a part of code review but readme file should be typo free as mostly users see only readme file to get your module working
Rest are okay for me.
Comment #28
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #28.0
PA robot commentedAdded Reviewed Project's link
Comment #29
muneer1st commentedComment #30
avpaderno