Skip to content

Commit

Permalink
Fix security: A password must NEVER be stored as cookie. GETPOST must
Browse files Browse the repository at this point in the history
analyse POST only.
  • Loading branch information
eldy committed Jun 12, 2016
1 parent 1396f11 commit cda17da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/main.inc.php
Expand Up @@ -438,7 +438,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
}

$usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : GETPOST("username","alpha",2));
$passwordtotest = (! empty($_COOKIE['password_dolibarr']) ? $_COOKIE['password_dolibarr'] : GETPOST('password'));
$passwordtotest = GETPOST('password','',2);
$entitytotest = (GETPOST('entity','int') ? GETPOST('entity','int') : (!empty($conf->entity) ? $conf->entity : 1));

// Validation of login/pass/entity
Expand Down

0 comments on commit cda17da

Please sign in to comment.