pass referuri to controller

This commit is contained in:
Uwe Steinmann 2020-08-26 11:39:42 +02:00
parent 020c8f0aa8
commit 92b049ee6d

View File

@ -75,6 +75,7 @@ $session = new SeedDMS_Session($db);
// TODO: by the PHP manual: The superglobals $_GET and $_REQUEST are already decoded. // TODO: by the PHP manual: The superglobals $_GET and $_REQUEST are already decoded.
// Using urldecode() on an element in $_GET or $_REQUEST could have unexpected and dangerous results. // Using urldecode() on an element in $_GET or $_REQUEST could have unexpected and dangerous results.
$referuri = '';
if (isset($_POST["referuri"]) && strlen($_POST["referuri"])>0) { if (isset($_POST["referuri"]) && strlen($_POST["referuri"])>0) {
$referuri = trim(urldecode($_POST["referuri"])); $referuri = trim(urldecode($_POST["referuri"]));
} }
@ -88,6 +89,7 @@ $controller->setParam('login', $login);
$controller->setParam('pwd', $pwd); $controller->setParam('pwd', $pwd);
$controller->setParam('lang', $lang); $controller->setParam('lang', $lang);
$controller->setParam('sesstheme', $sesstheme); $controller->setParam('sesstheme', $sesstheme);
$controller->setParam('referuri', $referuri);
$controller->setParam('session', $session); $controller->setParam('session', $session);
if(!$controller->run()) { if(!$controller->run()) {
add_log_line("login failed", PEAR_LOG_ERR); add_log_line("login failed", PEAR_LOG_ERR);