소스 검색

SEC-1939: Update SwitchUserFilter logger to use debug

Previously the SwitchUserFilter was logging as an error and then
throwing an Exception immediately after. This is not correct, since
whomever is catching the Exception should choose to log an error or not.

Now the log statement is at a debug level.
Rob Winch 13 년 전
부모
커밋
72aecaff05
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      web/src/main/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilter.java

+ 1 - 1
web/src/main/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilter.java

@@ -250,7 +250,7 @@ public class SwitchUserFilter extends GenericFilterBean implements ApplicationEv
         Authentication original = getSourceAuthentication(current);
 
         if (original == null) {
-            logger.error("Could not find original user Authentication object!");
+            logger.debug("Could not find original user Authentication object!");
             throw new AuthenticationCredentialsNotFoundException(messages.getMessage(
                     "SwitchUserFilter.noOriginalAuthentication",
                     "Could not find original Authentication object"));