https://issues.shibboleth.net/jira/browse/SSPCPP-527
[shibboleth/cpp-sp.git] / shibsp / ServiceProvider.cpp
index 6a56641..26d40e6 100644 (file)
@@ -305,7 +305,9 @@ pair<bool,long> ServiceProvider::doAuthentication(SPRequest& request, bool handl
                 if (!qstr || !strstr(qstr, "shiblogoutdone=1")) {
                     // First leg of circuit, so we redirect to the logout endpoint specified with this URL as a return location.
                     string selfurl = request.getRequestURL();
-                    if (!qstr)
+                    if (qstr)
+                        selfurl += '&';
+                    else
                         selfurl += '?';
                     selfurl += "shiblogoutdone=1";
                     string loc = requireLogoutWith.second;