Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Mar 2012 at 16:45 UTC
Updated:
15 Dec 2012 at 11:35 UTC
Jump to comment: Most recent file
Comments
Comment #1
musikpirat commentedHi Sean,
it seems, that you are working on a master branch, you should switch to a release branch: http://drupal.org/node/1127732
Ventral.org shows a number of issue with your code, most of them are formatting stuff: http://ventral.org/pareview/httpgitdrupalorgsandboxseanlwatkins1510620git
You should follow also these hints from ventral:
* Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
* Remove "version" from the info file, it will be added by drupal.org packaging automatically.
* Remove all old CVS $Id tags, they are not needed anymore.
You should also add a link to the project description page to the issue and provide a git clone link to make checkout easier.
The community really needs more hands in the application queue and highly recommends to get a review bonus so they (we) will(/can) come back to your application sooner.
Comment #2
ourwayoflife commentedI checked the code and it's well written and fully documented. I suggest you try to get a review bonus in order to get approved quicker.
Comment #3
seanlwatkins commentedI'm still working on fixing the formatting issues. It just takes time :(
Comment #4
seanlwatkins commentedI've fixed all my formatting issues for the most part: http://ventral.org/pareview/httpgitdrupalorgsandboxseanlwatkins1510620gi..., however, can anyone suggest the correct format for this:
The issue is the report expects 2 spaces for the function on line 4, but when it's moved to 2 spaces it than complains it needs 4 spaces because of the array list.
Comment #5
patrickd commentedI'd suggest not to use such big arrays as function default parameters, setting a default of array() and then merging it with the default options would probably be better.
Comment #6
patrickd commentedlike that:
Comment #7
janusman commentedI reviewed most of the code, and find it's well-written in general. I do have some recommendations.
Note that I'm not using any official priorization, and I'm not doing a proper by-the-book code review =) I just ordered things in terms of what I think you should fix first =) I think if the mentioned criticals are done this is probably ready to go.
Critical:
Moderate:
Minor:
Comment #8
seanlwatkins commentedOk, Critical issues have been fixed. Sorry about the .install file, oops. Added check_plain to user-configurable strings, I'll being doing another passover again to make sure.
Moderate fixes have been done with adding all the missing t()s. For now Javascript will have to be on, I'll work on having a non-javascript version for the next release.
Minor fixes involve the spacing problem with having a array expand more than 80 chars within a function paramater. I'm leaving in the "WHERE TRUE" just to keep my sql query a little clean for me. Yes I know I don't really need it :). I will most likely try and add i18n support in the next release.
Comment #9
janusman commentedI tried to actually use the module and while I could configure hours, locations and exceptions, I found that there are no blocks listed in admin/build/block! =) Seems you forgot to add the
case 'list':part inside your hook_block() implementation. (I'm guessing you'll have a block available for each location??)It'd be best if you just installed the module on a new Drupal site from scratch and make sure everything works... maybe you're testing with existing data and you didn't see these problems (like the .install problem) =)
Also, I see you added some check_plain() to output, but there are still some XSS vulnerabilities. You can just go ahead and test them yourselves by, say, adding this bit to location names, descriptions, exception names, etc:
For instance, this still triggers a problem on exceptions:


Also, ran a coder.module review and this is what came up... you might also want to fix it!
sites/all/modules/libhours/libhours.module
libhours.module
$rs = db_query("SELECT e.*, l.name FROM {libhours_exceptions} e INNER JOIN {libhours_locations} l ON l.lid=e.lid WHERE %d >= from_date AND %d <= to_date AND e.lid=%d LIMIT 1", $today, $today, $delta);$variables['pid'] = db_result(db_query("SELECT pid FROM {libhours_periods} WHERE %d >= from_date AND %d <= to_date AND lid=%d ORDER BY from_date DESC LIMIT 1", $today, $today, $lid));$variables['pid'] = db_result(db_query("SELECT pid FROM {libhours_periods} WHERE from_date >= %d AND lid=%d ORDER BY from_date ASC LIMIT 1", $today, $lid));sites/all/modules/libhours/libhours-display.tpl.php
libhours-display.tpl.php
sites/all/modules/libhours/libhours.admin.inc
libhours.admin.inc
drupal_set_title(t($period->name . ' Hours: ' . date("n/j/Y", $period->from_date) . ' - ' . date("n/j/Y", $period->to_date)));sites/all/modules/libhours/libhours.api.inc
libhours.api.inc
sites/all/modules/libhours/libhours.install
libhours.install
sites/all/modules/libhours/libhours.pages.inc
libhours.pages.inc
Good luck!
Comment #10
janusman commentedI forgot to mention you have some uses of db_affected_rows() after doing SELECTs... but I think that db_affected_rows() only returns *changed* rows (so is only useful after UPDATE or INSERT but not SELECT).
Comment #11
patrickd commenteddon't forget to tag applications having security issues properly
thanks for participation
Comment #12
seanlwatkins commentedThanks janusman for catching those problems. The hook_block() was from a previous version of the module which is no longer supported, hook_block() has been removed. I did do a fresh install and fixed the security problems and added check_plain() where needed. I did do a full check this time :). I also updated db_query with db_query_range() where appropriate.
Thanks so much to everyone reviewing this!
Comment #13
janusman commentedPossibly related/similar modules:
http://drupal.org/project/office_hours
http://drupal.org/sandbox/jeffam/1532432 (sandbox)
Comment #14
sylvain lecoy commentedManual review: the code is very clean generally speaking.
There is some coding style issue in the .install file with your arrays. Please correct them.
Your .api file is very well documented. If it was my module I would suggest to also add @param in your .admin file, I like the idea of "a line of code which is not documented does not exists".
For your tpl file I would suggest to remove all domain-related logic from the html. HTML should only represent the view, easy for a designer to modify.
I can't however set your review as RTBC, I don't know if I am allowed to do that.
Comment #15
sylvain lecoy commentedIt seems that I can.
Comment #16
klausiWe have currently exceeded the proposed project application thresholds, so this is on hold for me for now. Get a review bonus and I will review/approve this right away.
Comment #17
klausiSorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended in the application documentation.
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
Wrong branch name, 6.x-2.0.0 should be 6.x-2.x, see http://drupal.org/node/1015226
Review of the 6.x-2.0.0 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. You have to get a review bonus to get a review from me.
manual review:
Comment #17.0
klausiAdded project page, git url
Comment #18
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #18.0
klausiUpdated branch information