summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-12-03 20:14:36 -0500
committersullrich <sullrich@pfsense.org>2009-12-03 20:14:36 -0500
commit6af7c40b296e0f95ec308d41aea55b3306c5e1ee (patch)
treeb3642b0e7a6c994b9c170cd84ba4374629805b24 /etc
parent9329195961ef3e12ac21784a42ed3a658806b116 (diff)
downloadpfsense-6af7c40b296e0f95ec308d41aea55b3306c5e1ee.zip
pfsense-6af7c40b296e0f95ec308d41aea55b3306c5e1ee.tar.gz
Redirect to / when logging in to avoid posting to forms accidently and clearing the form and causing all kinds of chaos. Ticket #161
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/auth.inc2
-rw-r--r--etc/inc/authgui.inc4
2 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 2ae160e..753d041 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -885,6 +885,8 @@ function session_auth($backing) {
$_SESSION['Username'] = $_POST['usernamefld'];
$_SESSION['last_access'] = time();
log_error("Successful login for user '{$_POST['usernamefld']}' from: {$_SERVER['REMOTE_ADDR']}");
+ require_once("functions.inc");
+ pfSenseHeader("/{$page}");
}
}
} else {
diff --git a/etc/inc/authgui.inc b/etc/inc/authgui.inc
index 6fa3cfa..dcaa3d5 100644
--- a/etc/inc/authgui.inc
+++ b/etc/inc/authgui.inc
@@ -85,6 +85,7 @@ if (!isAllowedPage($_SERVER['SCRIPT_NAME'], $_SESSION['Username'])) {
if (count($allowedpages) > 0) {
$page = str_replace('*', '', $allowedpages[0]);
$_SESSION['Post_Login'] = true;
+ require_once("functions.inc");
pfSenseHeader("/{$page}");
exit;
} else {
@@ -99,7 +100,8 @@ if (!isAllowedPage($_SERVER['SCRIPT_NAME'], $_SESSION['Username'])) {
* taking action in reponse to a POST request
*/
if (!$_SESSION['Post_Login']) {
- $_SESSION['Post_Login'] = true;
+ $_SESSION['Post_Login'] = true;
+ require_once("functions.inc");
pfSenseHeader($_SERVER['REQUEST_URI']);
exit;
}
OpenPOWER on IntegriCloud