Commit 668f0c78 authored by Franco Fichtner's avatar Franco Fichtner

dashboard: url_safe() redirects

(cherry picked from commit a85a46b8)
(cherry picked from commit d7319957)
parent 16b5cc6a
......@@ -125,8 +125,8 @@ if (is_numeric($_POST['filterlogentries'])) {
}
write_config("Saved Filter Log Entries via Dashboard");
Header("Location: /");
exit(0);
header(url_safe('Location: /index.php'));
exit;
}
$nentries = isset($config['widgets']['filterlogentries']) ? $config['widgets']['filterlogentries'] : 5;
......
......@@ -58,7 +58,7 @@ if ($_POST) {
$config['widgets']['picturewidget'] = base64_encode($data);
$config['widgets']['picturewidget_filename'] = $_FILES['pictfile']['name'];
write_config("Picture widget saved via Dashboard.");
header("Location: /index.php");
header(url_safe('Location: /index.php'));
exit;
}
}
......
......@@ -44,7 +44,8 @@ if (!empty($_POST['rssfeed'])) {
$config['widgets']['rsswidgetheight'] = htmlspecialchars($_POST['rsswidgetheight'], ENT_QUOTES | ENT_HTML401);
$config['widgets']['rsswidgettextlength'] = htmlspecialchars($_POST['rsswidgettextlength'], ENT_QUOTES | ENT_HTML401);
write_config("Saved RSS Widget feed via Dashboard");
header("Location: /");
header(url_safe('Location: /index.php'));
exit;
}
// Use saved feed and max items
......
......@@ -41,8 +41,10 @@ $services = services_get();
if (isset($_POST['servicestatusfilter'])) {
$config['widgets']['servicestatusfilter'] = htmlspecialchars($_POST['servicestatusfilter'], ENT_QUOTES | ENT_HTML401);
write_config("Saved Service Status Filter via Dashboard");
header("Location: /index.php");
header(url_safe('Location: /index.php'));
exit;
}
?>
<div id="services_status-settings" class="widgetconfigdiv" style="display:none;">
<form action="/widgets/widgets/services_status.widget.php" method="post" name="iformd">
......
......@@ -40,7 +40,7 @@ if (is_numeric($_POST['logfiltercount'])) {
$countReceived = $_POST['logfiltercount'];
$config['widgets']['systemlogfiltercount'] = $countReceived;
write_config("Saved Widget System Log Filter Setting");
Header("Location: /index.php");
header(url_safe('Location: /index.php'));
exit;
}
......
......@@ -55,11 +55,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$config['widgets']['thermal_sensors_widget'][$fieldname] = validate_temp_value($newValue) ? $newValue : $defaultValue;
}
write_config("Thermal sensors widget saved via Dashboard.");
header("Location: /index.php");
die;
header(url_safe('Location: /index.php'));
exit;
}
?>
?>
<script type="text/javascript">
function thermal_sensors_widget_update(sender, data)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment