X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fhandler%2Fimpl%2FLocalLogoutInitiator.cpp;h=52ed0d01e4ac09fe9d79eed00a5fecfa2a6d4793;hb=8dd6c90beb315dbea1f42337961ae50da1ffda62;hp=aba50f985d5e3261249e65b9b9f26c2869b65a4c;hpb=661583ddefe3fe3676707ffd9354878f50fb6268;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/handler/impl/LocalLogoutInitiator.cpp b/shibsp/handler/impl/LocalLogoutInitiator.cpp index aba50f9..52ed0d0 100644 --- a/shibsp/handler/impl/LocalLogoutInitiator.cpp +++ b/shibsp/handler/impl/LocalLogoutInitiator.cpp @@ -197,7 +197,13 @@ pair LocalLogoutInitiator::doRequest( // Route back to return location specified, or use the local template. const char* dest = httpRequest.getParameter("return"); if (dest) { - limitRelayState(m_log, application, httpRequest, dest); + // Relative URLs get promoted, absolutes get validated. + if (*dest == '/') { + string d(dest); + httpRequest.absolutize(d); + return make_pair(true, httpResponse.sendRedirect(d.c_str())); + } + application.limitRedirect(httpRequest, dest); return make_pair(true, httpResponse.sendRedirect(dest)); } return sendLogoutPage(application, httpRequest, httpResponse, "local");