From 372847837af24990fe80a3471ee58fead875277f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 14 Dec 2010 09:30:37 -0800 Subject: [PATCH] Detect referer if wantsurl is not specified Signed-off-by: Rich Trott --- htdocs/auth/saml/index.php | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/htdocs/auth/saml/index.php b/htdocs/auth/saml/index.php index 0d9d909..3845c68 100644 --- a/htdocs/auth/saml/index.php +++ b/htdocs/auth/saml/index.php @@ -91,7 +91,9 @@ else if (isset($_SESSION['wantsurl'])) { $wantsurl = $_SESSION['wantsurl']; log_warn("auth/saml: retrieved wantsurl of: ".$wantsurl); } -else { +else if (! $saml_session->getIdP() ){ + $_SESSION['wantsurl'] = array_key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER['HTTP_REFERER'] : $CFG->wwwroot; +} else { $wantsurl = $CFG->wwwroot; log_warn("auth/saml: set default wantsurl of: ".$wantsurl); } -- 1.7.1.1