From 818a885c9caabf9c39b30d29e06046024aa7bdb2 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Fri, 31 Jan 2003 14:25:22 +0000 Subject: [PATCH] remove querystring params before stripping off owl_root_url --- presentation/login.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/presentation/login.php b/presentation/login.php index 1fe2aed..92bf67d 100644 --- a/presentation/login.php +++ b/presentation/login.php @@ -74,20 +74,21 @@ if ($loginAction == "loginForm") { // check for a location to forward to if (isset($redirect) && strlen(trim($redirect))>0) { - // need to strip owl_root_url off $redirect - if (strlen($default->owl_root_url) > 0) { - $tmp = urldecode($redirect); - $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp))"); - $redirect = substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp)); - $default->log->debug("login.php: redirect=$redirect"); - } - // remove any params from redirect before looking up from sitemap if (strstr($redirect, "?")) { $queryString = substr($redirect, strpos($redirect, "?")+1, strlen($redirect)); $redirect = substr($redirect, 0, strpos($redirect, "?")); $default->log->debug("login.php redirect=$redirect; querystring=$queryString"); } + + // need to strip owl_root_url off $redirect + if (strlen($default->owl_root_url) > 0) { + $tmp = urldecode($redirect); + $default->log->debug("login.php: substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp))"); + $redirect = substr($tmp, strpos($tmp, $default->owl_root_url), strlen($tmp)); + $default->log->debug("login.php: redirect=$redirect"); + } + $url = generateControllerUrl($default->siteMap->getActionFromPage($redirect)); // else redirect to the dashboard } else { -- libgit2 0.21.4