X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Flogin.php;h=fc5a4bf910f3e204298d58ad86a64e39d3771772;hp=4d58deabaad393bda43157c96aa8d6b9a5a7f205;hb=353d074afac6827c90f4bb03e846c5e453d3b5b1;hpb=6f4080b1147a4241458d4eec9e3285d5a650e7ee diff --git a/src/login.php b/src/login.php index 4d58deab..fc5a4bf9 100644 --- a/src/login.php +++ b/src/login.php @@ -6,21 +6,20 @@ * This a simple login screen. Some housekeeping is done to clean * cookies and find language. * - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2018 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail */ -// reduces the files included in init.php -$sInitLocation = 'login'; +/** This is the login page */ +define('PAGE_NAME', 'login'); /** * Include the SquirrelMail initialization file. */ require('../include/init.php'); - /* SquirrelMail required files. */ require_once(SM_PATH . 'functions/imap_general.php'); require_once(SM_PATH . 'functions/forms.php'); @@ -31,25 +30,6 @@ require_once(SM_PATH . 'functions/forms.php'); */ set_up_language($squirrelmail_language, TRUE, TRUE); -/** - * In case the last session was not terminated properly, make sure - * we get a new one, but make sure we preserve session_expired_* - */ -if ( !empty($_SESSION['session_expired_post']) && !empty($_SESSION['session_expired_location']) ) { - $sep = $_SESSION['session_expired_post']; - $sel = $_SESSION['session_expired_location']; - - sqsession_destroy(); - @sqsession_is_active(); - $_SESSION=array(); - sqsession_register($sep, 'session_expired_post'); - sqsession_register($sel, 'session_expired_location'); -} else { - sqsession_destroy(); - @sqsession_is_active(); - $_SESSION=array(); -} - /** * This detects if the IMAP server has logins disabled, and if so, * squelches the display of the login form and puts up a message @@ -79,21 +59,25 @@ if($imap_auth_mech == 'login') { } } +$username_form_name = 'login_username'; +$password_form_name = 'secretkey'; do_hook('login_cookie', $null); -$loginname_value = (sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : ''); +$loginname_value = (sqGetGlobalVar('loginname', $loginname) ? sm_encode_html_special_chars($loginname) : ''); //FIXME: should be part of the template, not the core! /* Output the javascript onload function. */ $header = "