Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions php/libraries/NDB_Client.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ class NDB_Client
$auth = $login->authenticate();
if ($auth === true) {
if ($login->passwordExpired()) {
header("HTTP/1.1 302 Found");
header("Location: /login/password-expiry");

return false;
}
$login->setState();
} elseif ($auth === false) {
Expand Down
29 changes: 0 additions & 29 deletions php/libraries/SinglePointLogin.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,6 @@ class SinglePointLogin
*/
var $_passwordChangeRequired = false;

/**
* Dumps the password expiry form
*
* @return void
* @access public
*/
function showPasswordExpiryScreen(): void
{
// FIXME: This is a temporary hack until the password reset logic is
// refactored to be sane and keep a token that can be authenticated.
//
// We store the username requesting the the password reset on the
// PHP session superglobal so that the password expiry page can
// trust it.
if ($_SERVER['REQUEST_URI'] == "/login/password-expiry/") {
// Prevent a loop to the same page if we got here
// while on the password expiry page, which can prevent
// error messages from being seen.
return;
}
$_SESSION['PasswordExpiredForUser'] = $_POST['username'];
header("HTTP/1.1 303 See Other");
header("Location: /login/password-expiry/");
exit(0);
}

/**
* Checks whether password change is required
*
Expand Down Expand Up @@ -393,9 +367,6 @@ class SinglePointLogin
if ($row['Expired']) {
$this->_passwordChangeRequired = true;
$_SESSION['PasswordExpiredForUser'] = $username;
if ($redirect) {
$this->showPasswordExpiryScreen();
}
return false;
}
// Allow a user to login if none of the previous cases have occurred
Expand Down
Loading