2
0
forked from Wavyzz/dolibarr

Fix: security

This commit is contained in:
Regis Houssin
2012-02-28 19:18:24 +01:00
parent 4bec281dd8
commit ffc492ba1f
3 changed files with 9 additions and 9 deletions

View File

@@ -34,13 +34,13 @@ $langs->load("categories");
$socid=GETPOST('socid');
if (!$user->rights->categorie->lire) accessforbidden();
$action = GETPOST('action');
$cancel = GETPOST('cancel');
$origin = GETPOST('origin');
$catorigin = GETPOST('catorigin');
$nbcats = (GETPOST('choix') ? GETPOST('choix') : 1);
$type = GETPOST('type');
$urlfrom = GETPOST("urlfrom");
$action = GETPOST('action','alpha');
$cancel = GETPOST('cancel','alpha');
$origin = GETPOST('origin','alpha');
$catorigin = GETPOST('catorigin','int');
$nbcats = (GETPOST('choix') ? GETPOST('choix') : 1); // TODO not use ?
$type = GETPOST('type','alpha');
$urlfrom = GETPOST('urlfrom','alpha');
if ($origin)
{

View File

@@ -209,7 +209,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
$sessiontimeout='DOLSESSTIMEOUT_'.$prefix;
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", '', 0);
if (GETPOST("urlfrom")) $_SESSION["urlfrom"]=GETPOST("urlfrom");
if (GETPOST('urlfrom','alpha')) $_SESSION["urlfrom"]=GETPOST('urlfrom','alpha');
else unset($_SESSION["urlfrom"]);
if (! GETPOST("username")) $focus_element='username';

View File

@@ -222,7 +222,7 @@ if (GETPOST("action") == 'gotodemo')
if ($disablestring)
{
$url=DOL_URL_ROOT.'/index.php?disablemodules='.$disablestring;
if (GETPOST("urlfrom")) $url.='&urlfrom='.GETPOST("urlfrom");
if (GETPOST('urlfrom','alpha')) $url.='&urlfrom='.GETPOST('urlfrom','alpha');
header("Location: ".$url);
exit;
}