You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2021/08/27 22:01:28 UTC

[GitHub] [knox] lmccay commented on a change in pull request #476: KNOX-2625 - initial commit

lmccay commented on a change in pull request #476:
URL: https://github.com/apache/knox/pull/476#discussion_r697740738



##########
File path: gateway-applications/src/main/resources/applications/knoxauth/app/logout.jsp
##########
@@ -62,15 +75,41 @@
                 whitelist = "";
             }
         }
+
+        boolean validRedirect = false;
         String origUrl = request.getParameter("originalUrl");
         String del = "?";
-        if (origUrl.contains("?")) {
+        if (origUrl != null && origUrl.contains("?")) {
           del = "&";
         }
-        boolean validRedirect = RegExUtils.checkWhitelist(whitelist, origUrl);
-        if (("1".equals(request.getParameter("returnToApp"))) && validRedirect) {
-          response.setStatus(response.SC_MOVED_PERMANENTLY);
-          response.setHeader("Location",originalUrl + del + "refresh=1");
+        if (origUrl != null) {

Review comment:
       It used later in the JSP to determine whether to display the link back to the app.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org