voroojax / waf-fle

Automatically exported from code.google.com/p/waf-fle
0 stars 0 forks source link

broken Top Rules Chart #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Home Dashboard
2.Any rule with special chars in description
3.

What is the expected output? What do you see instead?
Not Showing Top Rules chart 

What version of the product are you using? On what operating system?
0.7.0 (and 0.6.3) on a OpenSuse 13.1

Please provide any additional information below.
Seens like this issue occurs because when you set  barRulesData, you not escape 
the rule description, so I add an "addslashes()" and it works.
file: $WAFFLE_HOME/dashboard/index.php
line: 521
old content:  
$topRulesData = $topRulesData . "['" . $rulesData["message_ruleId"] . "'," . 
$rulesData["rule_count"] . ",'" . $rulesData["message_ruleMsg"] . "','" . 
$rulesData["message_ruleId"] . "'],";

new content:
$topRulesData = $topRulesData . "['" . $rulesData["message_ruleId"] . "'," . 
$rulesData["rule_count"] . ",'" . addslashes($rulesData["message_ruleMsg"]) . 
"','" . $rulesData["message_ruleId"] . "'],";

Original issue reported on code.google.com by ibere.ti...@gmail.com on 1 Apr 2014 at 2:45

GoogleCodeExporter commented 9 years ago
Thanks for report this.

I just fix it, but instead of use addslashes, I prefer to use headerprintnobr 
(a waf-fle function, from functions.php) that do both, add slash and encode 
special character as html entities.

Next release will have this.

Klaubert

Original comment by klaub...@gmail.com on 8 Jul 2014 at 3:20

GoogleCodeExporter commented 9 years ago

Original comment by klaub...@gmail.com on 8 Jul 2014 at 3:24