fix: Added support for https links in alerts procedure url (#4872)

This commit is contained in:
Neil Lathwood
2016-11-01 18:04:01 +00:00
committed by Daniel Preussker
parent d5b20dbd1f
commit 4a854e02ce
2 changed files with 2 additions and 2 deletions

View File

@@ -230,7 +230,7 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({
return "<button type=\'button\' class=\'btn btn-"+row.ack_col+" btn-sm command-ack-alert\' data-target=\'#ack-alert\' data-state=\'"+row.state+"\' data-alert_id=\'"+row.alert_id+"\' name=\'ack-alert\' id=\'ack-alert\' data-extra=\'"+row.extra+"\'><i class=\'fa fa-"+row.ack_ico+"\'aria-hidden=\'true\'></i></button>";
},
"proc": function(column,row) {
return "<button type=\'button\' class=\'btn command-open-proc\' data-alert_id=\'"+row.alert_id+"\' name=\'open-proc\' id=\'open-proc\'>Open</button>";
return "<button type=\'button\' class=\'btn btn-sm command-open-proc\' data-alert_id=\'"+row.alert_id+"\' name=\'open-proc\' id=\'open-proc\'>Open</button>";
},
"severity": function(column,row) {
var eventColor = "info";

View File

@@ -21,7 +21,7 @@ if (!is_numeric($alert_id)) {
$proc = dbFetchCell('SELECT proc FROM alerts,alert_rules WHERE alert_rules.id = alerts.rule_id AND alerts.id = ?', array($alert_id));
if (($proc == "") || ($proc == "NULL")) {
echo header("HTTP/1.0 404 Not Found");
} elseif (! preg_match('/^http:\/\//', $proc)) {
} elseif (! preg_match('/^http[s]*:\/\//', $proc)) {
echo "ERROR";
} else {
echo $proc;