Add int test

This commit is contained in:
Terry W Brady
2018-01-26 13:57:39 -08:00
parent fe3a7722d1
commit 254cc413a9
2 changed files with 56 additions and 1 deletions

View File

@@ -510,7 +510,18 @@ public class ShibAuthentication implements AuthenticationMethod
int port = request.getServerPort();
String contextPath = request.getContextPath();
String returnURL = request.getHeader("Referer");;
String returnURL = request.getHeader("Referer");
if (returnURL == null) {
if (request.isSecure() || forceHTTPS) {
returnURL = "https://";
} else {
returnURL = "http://";
}
returnURL += host;
if (!(port == 443 || port == 80)) {
returnURL += ":" + port;
}
}
try {
shibURL += "?target="+URLEncoder.encode(returnURL, "UTF-8");