Commit a85a46b8 authored by Franco Fichtner's avatar Franco Fichtner

dashboard: url_safe() redirects

PR: https://github.com/opnsense/core/issues/1168
parent 73e58543
......@@ -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">
......
......@@ -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