Multiple Cross-Site-Scripting vulnerabilities
This commit is contained in:
Regis Houssin 2011-11-08 14:44:27 +01:00
parent f0c327c070
commit d8e8d047f4
2 changed files with 4 additions and 4 deletions

View File

@ -237,7 +237,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
}
// Login
$login = (!empty($lastuser)?$lastuser:(GETPOST("username")?GETPOST("username"):$demologin));
$login = (!empty($lastuser)?$lastuser:(GETPOST("username","alpha",2)?GETPOST("username","alpha",2):$demologin));
$password = $demopassword;
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)

View File

@ -338,7 +338,7 @@ if (! defined('NOLOGIN'))
}
// Verification security graphic code
if (isset($_POST["username"]) && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
if (GETPOST("username","alpha",2) && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
{
require_once(ARTICHOW_PATH.'Artichow.cfg.php');
require_once(ARTICHOW.'/AntiSpam.class.php');
@ -352,7 +352,7 @@ if (! defined('NOLOGIN'))
$langs->load('main');
$langs->load('errors');
$user->trigger_mesg='ErrorBadValueForCode - login='.$_POST["username"];
$user->trigger_mesg='ErrorBadValueForCode - login='.GETPOST("username","alpha",2);
$_SESSION["dol_loginmesg"]=$langs->trans("ErrorBadValueForCode");
$test=false;
@ -365,7 +365,7 @@ if (! defined('NOLOGIN'))
}
}
$usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : $_POST["username"]);
$usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : GETPOST("username","alpha",2));
$passwordtotest = (! empty($_COOKIE['password_dolibarr']) ? $_COOKIE['password_dolibarr'] : $_POST["password"]);
$entitytotest = (! empty($_POST["entity"]) ? $_POST["entity"] : 1);