After the following Apache server security update on my application server, a flot-bar-chart is not rendering in PHP, although two pie-charts are. The bar chart works correctly on my local Apache web server.
"It was discovered that the HTTP parser in httpd incorrectly allowed certain characters not permitted by the HTTP protocol specification to appear unencoded in HTTP request headers. If httpd was used in conjunction with a proxy or backend server that interpreted those characters differently, a remote attacker could possibly use this flaw to inject data into HTTP responses, resulting in proxy cache poisoning."
I get the following error: Syntax Error: expected expression, got ',' index.php: 412:16
Here is the JS code for both types of charts, embedded in home.view (HTML):
<script language='javascript'>
function plot_bar(data) {
options = {
legend:{position:"nw"},
grid: {
hoverable: true
},
tooltip: true,
tooltipOpts: {
content: "week: %x, Number of consents: %y"
},
};
$.plot($("#flot-bar-chart"),data,options);
}
function plot_pie(data,id)
{
$.plot($('#'+id), data, {
series: {
pie: {
show: true
}
},
grid: {
hoverable: true
},
tooltip: true,
tooltipOpts: {
content: "%p.0%, %s", // show percentages
shifts: {
x: 20,
y: 0
},
defaultTheme: false
}
});
}
</script>
The output for index.php: 412:16 looks like this:
<script language='javascript'>plot_pie([{label:'Empty',data:380},
{label:'Full',data:180}],'flot-pie1-chart')</script><script
language='javascript'>plot_pie([{label:'Empty',data:560}],'flot-pie2-chart')
</script><script language='javascript'>plot_bar([{data:, label:'', lines:
{show:true},points:{show:true}},{data:[[45,52],[46,52],[47,27],[48,49],
[49,61],[50,43],[51,20],[52,20]], label:'2015', lines:{show:true},points:
{show:true}},{data:[[0,2],[1,23],[2,33],[3,32],[4,29],[5,44],[6,12],[7,17],
[8,22],[9,36],[10,23],[11,22],[12,23],[13,1],[14,58],[15,13],[16,31],
[17,20],[18,31],[19,40],[20,21],[21,19],[22,20],[23,19],[24,25],[25,21],
[26,44],[27,18],[28,18],[29,67],[30,126],[31,83],[32,103],[33,93],[34,82],
[35,124],[36,87],[37,83],[38,86],[39,69],[40,106],[41,107],[42,40],[43,73],
[44,110],[45,93],[46,57],[47,47],[48,54],[49,88],[50,111],[51,47],[52,36]],
label:'2016', lines:{show:true},points:{show:true}},{data:[[1,101],[2,85],
[3,65],[4,110],[5,86],[6,82],[7,12],[8,91],[9,96],[10,37],[11,95],[12,92],
[13,38],[14,41],[15,63],[16,83],[17,72],[18,56],[19,77],[20,54],[21,46],
[22,47],[23,50],[24,71],[25,46],[27,1],[31,243],[32,113],[33,85],[34,79],
[35,51],[36,86],[37,86],[38,113],[39,112],[40,99],[41,109],[42,107],[43,89],
[44,123],[45,132],[46,92]], label:'2017', lines:{show:true},points:
{show:true}}])</script>