Fix for SSPCPP-96.
authorScott Cantor <cantor.2@osu.edu>
Sun, 20 Apr 2008 03:22:46 +0000 (03:22 +0000)
committerScott Cantor <cantor.2@osu.edu>
Sun, 20 Apr 2008 03:22:46 +0000 (03:22 +0000)
adfs/adfs.cpp

index a631512..697a519 100644 (file)
@@ -877,18 +877,12 @@ pair<bool,long> ADFSLogoutInitiator::doRequest(
                 );
         }
 
-        // Save off return location as RelayState.
-        string relayState;
+        const URLEncoder* urlenc = XMLToolingConfig::getConfig().getURLEncoder();
         const char* returnloc = httpRequest.getParameter("return");
-        if (returnloc) {
-            relayState = returnloc;
-            preserveRelayState(application, httpResponse, relayState);
-        }
-        
         auto_ptr_char dest(ep->getLocation());
         string req=string(dest.get()) + (strchr(dest.get(),'?') ? '&' : '?') + "wa=wsignout1.0";
-        if (!relayState.empty())
-            req += "&wreply=" + relayState;
+        if (returnloc)
+            req += "&wreply=" + urlenc->encode(returnloc);
         ret.second = httpResponse.sendRedirect(req.c_str());
         ret.first = true;
     }