[MNT-21363][MNT-21511] Create Site fails with Kerb SSO in 6.2 (#647)

- Add catch for exception thrown when there is no web script found in the Public API Web Script Container
This commit is contained in:
Jared Ottley
2020-05-20 16:51:02 -06:00
parent b3a3b76112
commit d56e81154c

View File

@@ -52,6 +52,7 @@ import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.repo.web.auth.WebCredentials;
import org.alfresco.repo.web.filter.beans.DependencyInjectedFilter;
import org.alfresco.rest.api.PublicApiTenantWebScriptServletRequest;
import org.alfresco.rest.framework.core.exceptions.NotFoundException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.extensions.webscripts.RuntimeContainer;
@@ -201,7 +202,16 @@ public abstract class BaseSSOAuthenticationFilter extends BaseAuthenticationFilt
// Get the HTTP request/response
HttpServletRequest req = (HttpServletRequest) request;
Match match = container.getRegistry().findWebScript(req.getMethod(), getScriptUrl(req));
Match match = null;
try
{
match = container.getRegistry().findWebScript(req.getMethod(), getScriptUrl(req));
}
catch (NotFoundException notFoundEx)
{
getLogger().debug(req.getMethod() + " " + getScriptUrl(req) + "not found in Public API Container.");
}
// If a filter up the chain has marked the request as not requiring auth then respect it
if (request.getAttribute(NO_AUTH_REQUIRED) != null)