From 889c7bf64acf75fe2ac8defbba4587da1ee14b3c Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Tue, 13 Sep 2011 16:23:29 +0000 Subject: [PATCH] Prevent CAS from doing "keep-alive" redirects on POST requests. --- library/Creq/Controller/Action.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/Creq/Controller/Action.php b/library/Creq/Controller/Action.php index 2a9a5049..ac76490d 100644 --- a/library/Creq/Controller/Action.php +++ b/library/Creq/Controller/Action.php @@ -23,6 +23,11 @@ class Creq_Controller_Action extends Unl_Controller_Action return; } + // If a user is already logged in, only redirect to CAS if this is a GET request. + if (Zend_Auth::getInstance()->hasIdentity() && $_SERVER['REQUEST_METHOD'] != 'GET') { + return; + } + if (array_key_exists('unl_sso', $_COOKIE) || Zend_Auth::getInstance()->hasIdentity()) { Auth_UserModel::authenticateUser(); } -- GitLab