mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Fix for Issue 481 (Enhanced) - Links to protected pages (such as emailed conference recording links, etc) will now properly redirect upon a successful login attempt AFTER failed login attempts.
This commit is contained in:
@@ -45,9 +45,9 @@ require_once "resources/require.php";
|
||||
|
||||
//if the username is not provided then send to login.php
|
||||
if (strlen(check_str($_REQUEST["username"])) == 0 && strlen(check_str($_REQUEST["key"])) == 0) {
|
||||
$php_self = $_SERVER["PHP_SELF"];
|
||||
$msg = "username required";
|
||||
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($php_self)."&msg=".urlencode($msg));
|
||||
$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["PHP_SELF"];
|
||||
$_SESSION["message"] = "Invalid Username and/or Password";
|
||||
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path));
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -263,9 +263,9 @@ require_once "resources/require.php";
|
||||
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] authentication failed for ".check_str($_REQUEST["username"]));
|
||||
closelog();
|
||||
//redirect the user to the login page
|
||||
$php_self = $_SERVER["PHP_SELF"];
|
||||
$msg = "incorrect account information";
|
||||
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($php_self)."&msg=".urlencode($msg));
|
||||
$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["PHP_SELF"];
|
||||
$_SESSION["message"] = "Invalid Username and/or Password";
|
||||
header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path));
|
||||
exit;
|
||||
}
|
||||
foreach ($result as &$row) {
|
||||
|
||||
Reference in New Issue
Block a user