mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
79033: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 78970: Merged DEV to V4.2-BUG-FIX (4.2.4) 78847: MNT-11760 : No auditing entries generated for failed logins with audit.alfresco-access.enabled=true configured Fixed audit logging for failed logins. 78848: MNT-11760 : No auditing entries generated for failed logins with audit.alfresco-access.enabled=true configured Fixed tests to highlight the issue. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82681 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2012 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -36,6 +36,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.error.StackTraceUtil;
|
||||
import org.alfresco.repo.audit.model.AuditApplication;
|
||||
import org.alfresco.repo.domain.schema.SchemaBootstrap;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.Auditable;
|
||||
@@ -517,7 +518,17 @@ public class AuditMethodInterceptor implements MethodInterceptor
|
||||
{
|
||||
public Map<String, Serializable> execute() throws Throwable
|
||||
{
|
||||
return auditComponent.recordAuditValues(rootPath, auditData);
|
||||
// Record thrown exceptions regardless of userFilter in case of failed authentication
|
||||
// see MNT-11760
|
||||
if (thrown instanceof AuthenticationException)
|
||||
{
|
||||
return auditComponent.recordAuditValuesWithUserFilter(rootPath, auditData, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return auditComponent.recordAuditValues(rootPath, auditData);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
try
|
||||
|
Reference in New Issue
Block a user