diff --git a/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java b/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java index 615cc15b54..ea59ce4c9a 100644 --- a/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java +++ b/src/main/java/org/alfresco/repo/webdav/auth/BaseSSOAuthenticationFilter.java @@ -580,17 +580,14 @@ public abstract class BaseSSOAuthenticationFilter extends BaseAuthenticationFilt { resp.setContentType(MIME_HTML_TEXT); - final PrintWriter out = resp.getWriter(); - out.println(""); - // Remove the auto refresh to avoid refresh loop, MNT-16931 -// out.println(""); - out.println("

Please log in.

"); - out.println(""); - out.close(); + try (PrintWriter out = resp.getWriter()) + { + out.println(""); + // Removed the auto refresh to avoid refresh loop, MNT-16931 + // Removed the link to the login page, MNT-20200 + out.println("

Login failed. Please try again.

"); + out.println(""); + } } } diff --git a/src/main/java/org/alfresco/repo/webdav/auth/KerberosAuthenticationFilter.java b/src/main/java/org/alfresco/repo/webdav/auth/KerberosAuthenticationFilter.java index a520c0f0b8..6a019a950b 100644 --- a/src/main/java/org/alfresco/repo/webdav/auth/KerberosAuthenticationFilter.java +++ b/src/main/java/org/alfresco/repo/webdav/auth/KerberosAuthenticationFilter.java @@ -2,7 +2,7 @@ * #%L * Alfresco Remote API * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of @@ -90,16 +90,18 @@ public class KerberosAuthenticationFilter extends BaseKerberosAuthenticationFilt * @param resp HttpServletResponse * @throws IOException */ + @Override protected void writeLoginPageLink(ServletContext context, HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType(MIME_HTML_TEXT); - final PrintWriter out = resp.getWriter(); - out.println(""); - // Remove the auto refresh to avoid refresh loop, MNT-16931 -// out.println(""); - out.println("

Please log in.

"); - out.println(""); - out.close(); + try (PrintWriter out = resp.getWriter()) + { + out.println(""); + // Removed the auto refresh to avoid refresh loop, MNT-16931 + // Removed the link to the login page, MNT-20200 + out.println("

Login failed. Please try again.

"); + out.println(""); + } } } diff --git a/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java b/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java index eaab3ba845..f433c0dbf2 100644 --- a/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java +++ b/src/main/java/org/alfresco/web/app/servlet/AlfrescoX509ServletFilter.java @@ -1,8 +1,8 @@ /* * #%L - * Alfresco Repository WAR Community + * Alfresco Remote API * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of diff --git a/src/main/java/org/alfresco/web/app/servlet/CORSContextListener.java b/src/main/java/org/alfresco/web/app/servlet/CORSContextListener.java index 4316ee0ac3..01cb4958d1 100644 --- a/src/main/java/org/alfresco/web/app/servlet/CORSContextListener.java +++ b/src/main/java/org/alfresco/web/app/servlet/CORSContextListener.java @@ -1,24 +1,24 @@ /* * #%L - * Alfresco Repository WAR Community + * Alfresco Remote API * %% - * Copyright (C) 2005 - 2018 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is + * This file is part of the Alfresco software. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is * provided under the following open source license terms: - * + * * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * Alfresco is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public License * along with Alfresco. If not, see . * #L% diff --git a/src/main/java/org/alfresco/web/app/servlet/GlobalLocalizationFilter.java b/src/main/java/org/alfresco/web/app/servlet/GlobalLocalizationFilter.java index 41dc64cb24..4a2bfabae3 100644 --- a/src/main/java/org/alfresco/web/app/servlet/GlobalLocalizationFilter.java +++ b/src/main/java/org/alfresco/web/app/servlet/GlobalLocalizationFilter.java @@ -1,8 +1,8 @@ /* * #%L - * Alfresco Repository WAR Community + * Alfresco Remote API * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of diff --git a/src/main/java/org/alfresco/web/app/servlet/KerberosAuthenticationFilter.java b/src/main/java/org/alfresco/web/app/servlet/KerberosAuthenticationFilter.java index b0e9bce098..6479be48c1 100644 --- a/src/main/java/org/alfresco/web/app/servlet/KerberosAuthenticationFilter.java +++ b/src/main/java/org/alfresco/web/app/servlet/KerberosAuthenticationFilter.java @@ -1,8 +1,8 @@ /* * #%L - * Alfresco Repository WAR Community + * Alfresco Remote API * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of @@ -78,17 +78,6 @@ public class KerberosAuthenticationFilter extends BaseKerberosAuthenticationFilt redirectToLoginPage(req, res); } - /* (non-Javadoc) - * @see org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter#onLoginComplete(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) - */ - @Override - protected boolean onLoginComplete(ServletContext sc, HttpServletRequest req, HttpServletResponse res, boolean userInit) - throws IOException - { - String requestURI = req.getRequestURI(); - return true; - } - /* (non-Javadoc) * @see org.alfresco.repo.webdav.auth.BaseSSOAuthenticationFilter#writeLoginPageLink(javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */ @@ -96,17 +85,17 @@ public class KerberosAuthenticationFilter extends BaseKerberosAuthenticationFilt protected void writeLoginPageLink(ServletContext context, HttpServletRequest req, HttpServletResponse resp) throws IOException { - String redirectURL = req.getRequestURI(); resp.setContentType("text/html; charset=UTF-8"); resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED); - - final PrintWriter out = resp.getWriter(); - out.println(""); - // Remove the auto refresh to avoid refresh loop, MNT-16931 -// out.println(""); - out.println("

Please log in.

"); - out.println(""); - out.close(); + + try (PrintWriter out = resp.getWriter()) + { + out.println(""); + // Removed the auto refresh to avoid refresh loop, MNT-16931 + // Removed the link to the login page, MNT-20200 + out.println("

Login failed. Please try again.

"); + out.println(""); + } } /* (non-Javadoc) diff --git a/src/main/java/org/alfresco/web/app/servlet/WebScriptSSOAuthenticationFilter.java b/src/main/java/org/alfresco/web/app/servlet/WebScriptSSOAuthenticationFilter.java index 8370781d00..7e2ca0311b 100644 --- a/src/main/java/org/alfresco/web/app/servlet/WebScriptSSOAuthenticationFilter.java +++ b/src/main/java/org/alfresco/web/app/servlet/WebScriptSSOAuthenticationFilter.java @@ -1,8 +1,8 @@ /* * #%L - * Alfresco Repository WAR Community + * Alfresco Remote API * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of diff --git a/src/main/java/org/alfresco/web/app/servlet/WebscriptCookieAuthenticationFilter.java b/src/main/java/org/alfresco/web/app/servlet/WebscriptCookieAuthenticationFilter.java index 2f5111f4a3..4844ccfab5 100644 --- a/src/main/java/org/alfresco/web/app/servlet/WebscriptCookieAuthenticationFilter.java +++ b/src/main/java/org/alfresco/web/app/servlet/WebscriptCookieAuthenticationFilter.java @@ -1,8 +1,8 @@ /* * #%L - * Alfresco Repository WAR Community + * Alfresco Remote API * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited + * Copyright (C) 2005 - 2019 Alfresco Software Limited * %% * This file is part of the Alfresco software. * If the software was purchased under a paid Alfresco license, the terms of