Closed (fixed)
Project:
js2watchdog
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 May 2011 at 12:40 UTC
Updated:
31 May 2011 at 05:29 UTC
I believe the $key and $value may contain javascript which could be used for XSS since watchdog messages are not filtered during output. I suggest using check_plain or filter_xss or whatever feels most appropriate. See http://drupalscout.com/knowledge-base/anything-you-can-do-xss-can-do-better and http://drupalscout.com/knowledge-base/drupal-text-filtering-cheat-sheet-... for advice on XSS.
This is made worse by the fact that the callback doesn't have any CSRF protection such as a token. See http://drupalscout.com/knowledge-base/protecting-your-drupal-module-agai... for details.
Comments
Comment #1
IRuslan commentedFor $key i've add check_plain().
But for $value, i think it's not necessary, because it's outputed thru @ placeholder.
Comment #2
gregglesYes indeed. And I see you added anti-CSRF token support as well - thanks!
Comment #3
IRuslan commented