Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Jan 2012 at 01:25 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ds_dreamconception commentedHere is some screenhots, to get a quick view:
http://csupporthq.com/files/plugins/drupal-screenshots/admin-settings-ge...
http://csupporthq.com/files/plugins/drupal-screenshots/admin-settings-la...
http://csupporthq.com/files/plugins/drupal-screenshots/example.png
Comment #2
michaelmol commentedManual review of cSupport 7.x-1.x branch:
csupport.module:101
Control structures should include the curly braces, http://drupal.org/coding-standards#controlstruct
There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review 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. Go and review some other project applications, so we can get back to yours sooner.
Comment #3
ds_dreamconception commentedThank you Michael. I have updated the branch with the code syntax fixed as well as the extra info file deleted. Also I caught a bug.
It should run through Drupal Code Sniffer as well as PAReview.sh smoothly now.
http://ventral.org/pareview/httpgitdrupalorgsandboxcsupport1405472git
Comment #4
ds_dreamconception commentedStatus update
Comment #5
michaelmol commentedManual review of the 7.x-1.x branch:
Minor coding style issues:
csupport.module
csupport.admin.inc
Other Issues:
I'll get the "The margin hast to be only numbers" although I filled in a number.
This is caused by the fact the value is a string (and not an integer).
So the check
!is_int($form_state['values']['csupport_margin'])will fail, therefore you can use PHP intval to get the integer value of this variable.The type (
$form['general']['csupport_type']) doesn't update when I select the other option, the value of #default_value is hardcoded and not handled through the variable_get() function.Other Question, is there a possibility to have a development mode where I can actually see the cSupport window, without having to register for a trial?
Comment #6
ds_dreamconception commentedThank you so much Michael, I feel a bit embarrassed that this bug has slipped through. Instead of using intVal, I now simply verifying that the number is numeric and is actual an integer. The selection bug is fixed as well, as the syntax errors.
To see the cSupport window without registering, best bet would be to use chat.csupporthq.com as domain. I could create an account for testing here, but due to the openness of the forum I prefer sending this information privately to prevent abuse. Let me know whatever way that you prefer.
Comment #7
michaelmol commentedCoder and PAReview gives out a clean result
Manual review of the 7.x-1.x branch:
csupport.admin.inc
in csupport.admin.inc
csupport.module
if ($margin > 0 && $margin < 101)and the input field is limited by 2 chars, why is this?Other consideration is to have the button in a block, but that is more a feature request.
I think you are almost there, besides the jQuery implementation and the role visibility issue, but someone else should give their opinion about it.
Comment #8
ds_dreamconception commentedHello again Michael
The code has been updated, and answers are here to the other parts:
The reason for the jQuery handling, is because I experienced a bug in the Farbtastic module, the default action, that if you have a blank input/no color, Farbtastic simply doesn't work as it should. At least as how I want it to work.
As far as I have read and understand the coding guide, this is the proper way in Drupal, when you include single quote ' in the string. Because else it has to be escaped.
Yes, it should be consistant with the input value of maximum 2 chars, it has been fixed. We choose some form of restrictions to the actual layout so we have consistency throughout our plugins on all systems.
I will await for others to join and discuss if role visibility implementation should be done with permission or the way it is is consistant enough. Thank you.
Comment #9
scarer commentedHi csupport,
Everything seems to be validating OK through ventral.
I totally understand when you want to output javascript and it seems like there is no other way than to just to blatantly output it! I'm just wondering if you could possibly modify the form to use "attached" to import your javascript a little nicer. Perhaps you could write to the element using your javascript file rather than outputting it as you are. attached info is here: http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#attached
I think definitely move the role visibility implementation into where you have your hook_access/hook_permission implementation.
Just going off what's been posted here :) I had a look at the code and apart from the lengthy javascript insertion it looks alright to me.
Cheers.
Comment #10
ds_dreamconception commentedHello scarer
I am a bit surprised how slow the validation process is, even though it is a commercial plugin, and thus not very interesting for most. Now I have waited one and a half months from the last update. Anyways, thanks for checking the code scarer, I appreciate it much.
Regarding the output of the javascript, I basically just went the way of similar plugins, as it seamed to be the most commun way of doing it. Actually the role visibility was also inspired this way.
I will await for more responses, and hopefully the plugin is ready for approval. Thanks.
Comment #11
scarer commentedhi csupport,
hey fair enough. you should try doing some reviews to try and bounce your project forward. check it out here: http://drupal.org/node/1410826
good luck!
Comment #12
ds_dreamconception commentedThanks scarer.
Comment #13
klausiSorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended here: http://drupal.org/node/1011698
Review 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:
"; //--><!]]> </script><script>alert('XSS'); //as domain name I get a nasty javascript popup. I would suggest that you pass your variables as javascript settings with drupal_add_js() and that you put your actual javascript into a dedicated *.js file. Please make sure to read http://drupal.org/writing-secure-code and all subpages.Comment #14
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #15
ds_dreamconception commentedThanks klausi. I didn't do any reviews as I haven't felt qualified to do it!
I have rewritten the code, removed the unnecessary parts, escaped all that could be used for XSS (check_plain), and updated so it comply fully with Code Sniffer. Let me know if it fits the standards now. Thank you all for your time!
Comment #16
jongagne commentedRecommendations
Comment #17
jongagne commentedComment #18
ds_dreamconception commentedI appreciate your effort jongagne, but I really don't understand your feedback. I didn't think that external services has to comply with these kind of things (specific colors, text, and everything else, something you btw have full control of yourself)? The Drupal plugin code as far as I can see is secure, and comply with Drupal code standards. The kind of feedback you have offered basically makes it impossible to submit this plugin. I guess the same will be true for all other plugins that uses external services. Let me know!
Comment #19
chris.smith commentedJust wanted to give you the review from an outside user. The module is secure but a bit buggy in overlay/development mode.
Comment #20
klausiThis application is not fixed? See http://drupal.org/node/532400
Comment #21
kscheirerComment #22
kscheirerYou have some unicode characters in your README.txt, which should only contain ASCII.
_csupport_role_can_see() shouldn't really exist. You should have a second permissions called (for ex) "see csupport chat" or something, and then the admin can assign it to all the roles necessary. Then your code can just check with user_access('see csupport chat') or whatever you named the permission.
Those are minor issues though, this looks RTBC from me.
Comment #23
kscheirercSupport does have a Drupal module listed at http://csupporthq.com/knowledgebase/plugins-for-csupport/ - but its just a zip file, and seems to refer to a defunct module - http://drupal.org/project/csupport_live_chat_plugin.
They should probably update that.
Comment #24
ds_dreamconception commentedREADME.txt has been updated to only ASCII. The _csupport_role_can_see() method is actually an inspiration from another drupal module, and as you said it is minor issues and the module is RTBC I will not touch it. The link will be updated when we can direct to a project page on drupal. Thank you very much kscheirer!
Comment #25
kscheirerDrupal.org has the following policy
Can you confirm that the csupport account is a single user? Filling out your profile at https://drupal.org/user/1765736 would help.
If you prefer, we can also promote this sandbox to a full project without granting you "git vetted user" access.
Comment #26
ds_dreamconception commentedYes, this profile is only being used by a single person, but was reflecting the company. I believe it is best I update the profile, as I might participate in the future at other modules. The change has been done now and should reflect a single person with my initials. Let me know kscheirer.
Comment #27
kscheirerThanks for the update, that looks better. Don't forget to update your git user name as well!
Thanks for your contribution, ds_dreamconception!
I updated your account to let you 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 get 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.
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #28
ds_dreamconception commentedUpdated username for git, so all looks good now. Thanks again kscheirer!
Comment #29
ds_dreamconception commentedUpdated username for git, so all looks good now. Thanks again kscheirer!