Closed (fixed)
Project:
Honeypot
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2012 at 03:58 UTC
Updated:
21 Oct 2012 at 04:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
geerlingguy commentedAttached patch fixes two
st()calls, but there are a bunch of things that are plain wrong in the coder review. For example:Format should be * Implementation of hook_foo().for what I have asImplements hook_schema()- coder review is applying a D6 code style rule to D7.Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs)- well, for links in translatable messages, the!passthrough placeholder is the only option. I don't think coder should necessarily mark that as a critical issue, since it's used pretty much everywhere. Maybe a small notice, to remind devs to use@and%where appropriate, but not a critical issue.Format should be * Implementation of hook_foo().for what I have asImplements hook_cron()- same as #1.in most cases, replace the string function with the drupal_ equivalent string functions- In this case, though,substr()is more fitting, and the docs fordrupal_substr()even mention that in cases where the length to trim is known, you shouldn't use the drupal_ function.Full listing here: http://qa.drupal.org/pifr/test/324973
I'm tracking this in #1361508: [META] Tracking issue for Coder Advisory Review test issues.
Comment #2
geerlingguy commentedI committed the patch in the previous comment. I will wait until I learn more from #1361508: [META] Tracking issue for Coder Advisory Review test issues before closing this issue.
Comment #3
lars toomre commentedCan you also open issues for each of these in the Coder module issue queue? I think they need to be there to resolve these false positive sniffs. Thanks.
Comment #4
geerlingguy commentedLars - thanks! I opened the following issues:
Marking this issue fixed, and I'll approach other coder warnings as they're decided.