mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
[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:
@@ -52,6 +52,7 @@ import org.alfresco.repo.security.authentication.AuthenticationException;
|
|||||||
import org.alfresco.repo.web.auth.WebCredentials;
|
import org.alfresco.repo.web.auth.WebCredentials;
|
||||||
import org.alfresco.repo.web.filter.beans.DependencyInjectedFilter;
|
import org.alfresco.repo.web.filter.beans.DependencyInjectedFilter;
|
||||||
import org.alfresco.rest.api.PublicApiTenantWebScriptServletRequest;
|
import org.alfresco.rest.api.PublicApiTenantWebScriptServletRequest;
|
||||||
|
import org.alfresco.rest.framework.core.exceptions.NotFoundException;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.extensions.webscripts.RuntimeContainer;
|
import org.springframework.extensions.webscripts.RuntimeContainer;
|
||||||
@@ -201,7 +202,16 @@ public abstract class BaseSSOAuthenticationFilter extends BaseAuthenticationFilt
|
|||||||
// Get the HTTP request/response
|
// Get the HTTP request/response
|
||||||
HttpServletRequest req = (HttpServletRequest) request;
|
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 a filter up the chain has marked the request as not requiring auth then respect it
|
||||||
if (request.getAttribute(NO_AUTH_REQUIRED) != null)
|
if (request.getAttribute(NO_AUTH_REQUIRED) != null)
|
||||||
|
Reference in New Issue
Block a user