#44 fixed login issue

This commit is contained in:
Roland Gruber 2018-01-16 18:31:52 +01:00
parent fa9f2490ec
commit 44eb1b93d2
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,7 @@
March 2018 6.3
- Server profile: added option if referential integrity overlay is active to sip cleanup actions
- Bugs:
-> Login page not working when no server profile exists (44)
- LAM Pro:
-> Support custom structural object classes with new custom type
-> Support dynamic lists

View File

@ -170,12 +170,12 @@ $_SESSION['header'] .= "<meta http-equiv=\"pragma\" content=\"no-cache\">\n <me
/**
* Displays the login window.
*
* @param LAMConfig $config_object current active configuration
* @param LAMCfgMain $cfgMain main configuration
* @param \LAM\ENV\LAMLicenseValidator $licenseValidator license validator
* @param string $error_message error message to display
*/
function display_LoginPage(LAMConfig $config_object, LAMCfgMain $cfgMain, $licenseValidator, $error_message) {
function display_LoginPage($licenseValidator, $error_message) {
$config_object = $_SESSION['config'];
$cfgMain = $_SESSION["cfgMain"];
logNewMessage(LOG_DEBUG, "Display login page");
// generate 256 bit key and initialization vector for user/passwd-encryption
if(function_exists('openssl_random_pseudo_bytes') && ($cfgMain->encryptSession == 'true')) {
@ -489,7 +489,7 @@ if(isset($_POST['checklogin'])) {
if($_POST['passwd'] == "") {
logNewMessage(LOG_DEBUG, "Empty password for login");
$error_message = _("Empty password submitted. Please try again.");
display_LoginPage($_SESSION['config'], $_SESSION["cfgMain"], $licenseValidator, $error_message); // Empty password submitted. Return to login page.
display_LoginPage($licenseValidator, $error_message); // Empty password submitted. Return to login page.
exit();
}
$username = $_POST['username'];
@ -547,7 +547,7 @@ if(isset($_POST['checklogin'])) {
$error_message = $searchError;
logNewMessage(LOG_ERR, 'User ' . $username . ' (' . $clientSource . ') failed to log in. ' . $searchError . '');
$searchLDAP->close();
display_LoginPage($_SESSION['config'], $_SESSION["cfgMain"], $licenseValidator, $error_message);
display_LoginPage($licenseValidator, $error_message);
exit();
}
$searchLDAP->close();
@ -600,11 +600,11 @@ if(isset($_POST['checklogin'])) {
$error_message = _("LDAP error, server says:") . "\n<br>($result) " . ldap_err2str($result);
logNewMessage(LOG_ERR, 'User ' . $username . ' (' . $clientSource . ') failed to log in (LDAP error: ' . ldap_err2str($result) . ').');
}
display_LoginPage($_SESSION['config'], $_SESSION["cfgMain"], $licenseValidator, $error_message);
display_LoginPage($licenseValidator, $error_message);
exit();
}
}
//displays the login window
display_LoginPage($_SESSION["config"], $_SESSION["cfgMain"], $licenseValidator, $error_message);
display_LoginPage($licenseValidator, $error_message);
?>