login.php, users/login.php:

- trim() $fUsername - MySQL thinks "foo" == "foo  " (and therefore allows
  login as "foo@example.com " - but later we'll get funny "undefined index"
  problems in PFAHander->view()) when an admin wants to change the password


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1665 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 10 years ago
parent 3b19dfeff6
commit 1d520423a9

@ -38,7 +38,7 @@ if($CONF['configured'] !== true) {
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$lang = safepost('lang');
$fUsername = safepost('fUsername');
$fUsername = trim(safepost('fUsername'));
$fPassword = safepost('fPassword');
if ( $lang != check_language(0) ) { # only set cookie if language selection was changed

@ -34,7 +34,7 @@ require_once("../common.php");
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$lang = safepost('lang');
$fUsername = safepost('fUsername');
$fUsername = trim(safepost('fUsername'));
$fPassword = safepost('fPassword');
if ( $lang != check_language(0) ) { # only set cookie if language selection was changed

Loading…
Cancel
Save