Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
Squert: Priority counts incorrect #1277
Browse files Browse the repository at this point in the history
  • Loading branch information
dougburks committed Jul 5, 2018
1 parent b1d5fcb commit 0fba4af
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .inc/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@ function level0() {
$query->execute($merged_params);
// fetch the data and encode to json
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
// the frontend expects all values to be strings
for ($i=0;$i<count($rows);$i++) {
$rows[$i] = array_map('strval', $rows[$i]);
}
$theJSON = json_encode($rows);
echo $theJSON;
}
Expand Down Expand Up @@ -385,6 +389,10 @@ function level1() {
$query->execute($merged_params);
// fetch the data and encode to json
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
// the frontend expects all values to be strings
for ($i=0;$i<count($rows);$i++) {
$rows[$i] = array_map('strval', $rows[$i]);
}
$theJSON = json_encode($rows);
echo $theJSON;
}
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
securityonion-squert (20161212-1ubuntu1securityonion42) xenial; urgency=medium

* Squert: Priority counts incorrect #1277

-- Doug Burks <[email protected]> Thu, 05 Jul 2018 07:06:30 -0400

securityonion-squert (20161212-1ubuntu1securityonion41) xenial; urgency=medium

* Issue 1259: Squert: turning grouping off results in no alerts
Expand Down
49 changes: 49 additions & 0 deletions debian/patches/Squert:-Priority-counts-incorrect-#1277
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
securityonion-squert (20161212-1ubuntu1securityonion42) xenial; urgency=medium
.
* Squert: Priority counts incorrect #1277
Author: Doug Burks <[email protected]>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- securityonion-squert-20161212.orig/.inc/callback.php
+++ securityonion-squert-20161212/.inc/callback.php
@@ -325,6 +325,10 @@ function level0() {
$query->execute($merged_params);
// fetch the data and encode to json
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
+ // the frontend expects all values to be strings
+ for ($i=0;$i<count($rows);$i++) {
+ $rows[$i] = array_map('strval', $rows[$i]);
+ }
$theJSON = json_encode($rows);
echo $theJSON;
}
@@ -385,6 +389,10 @@ function level1() {
$query->execute($merged_params);
// fetch the data and encode to json
$rows = $query->fetchAll(PDO::FETCH_ASSOC);
+ // the frontend expects all values to be strings
+ for ($i=0;$i<count($rows);$i++) {
+ $rows[$i] = array_map('strval', $rows[$i]);
+ }
$theJSON = json_encode($rows);
echo $theJSON;
}
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ update-mysql-function-calls-in-ip2c.php
remove-unnecessary-code-from-ip2c.php:wq
Issue-1169:-Squert:-remove-search-link-from-context-menu
Issue-1259:-Squert:-turning-grouping-off-results-in-no-alerts
Squert:-Priority-counts-incorrect-#1277

0 comments on commit 0fba4af

Please sign in to comment.