Commit d7319957 authored by Franco Fichtner's avatar Franco Fichtner

dashboard: this needs absolte redirects, some missed spots

Relative redirect is used almost everywhere, but to be honest
it looks safer to make all paths absolute.

PR: https://github.com/opnsense/core/issues/1168
parent a85a46b8
......@@ -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(url_safe('Location: index.php'));
header(url_safe('Location: /index.php'));
exit;
}
}
......
......@@ -44,7 +44,7 @@ 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(url_safe('Location: index.php'));
header(url_safe('Location: /index.php'));
exit;
}
......
......@@ -41,7 +41,7 @@ $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(url_safe('Location: index.php'));
header(url_safe('Location: /index.php'));
exit;
}
......
......@@ -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,7 +55,7 @@ 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(url_safe('Location: index.php'));
header(url_safe('Location: /index.php'));
exit;
}
......
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