From 0e9caf0c013529f14d4e22561c38f050165c6772 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 16 Dec 2016 16:33:23 +0100 Subject: [PATCH] SONAR-8416 fix login failure log at OAuth2 successful authent --- .../org/sonar/server/authentication/UserSessionInitializer.java | 2 +- .../sonar/server/authentication/UserSessionInitializerTest.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/authentication/UserSessionInitializer.java b/server/sonar-server/src/main/java/org/sonar/server/authentication/UserSessionInitializer.java index f63d4efd7d8..ea4b5da9097 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/authentication/UserSessionInitializer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/authentication/UserSessionInitializer.java @@ -61,7 +61,7 @@ public class UserSessionInitializer { "/batch/index", "/batch/file", "/maintenance/*", "/setup/*", - "/sessions/*", + "/sessions/*", "/oauth2/callback/*", "/api/system/db_migration_status", "/api/system/status", "/api/system/migrate_db", "/api/server/index", "/api/server/setup", "/api/server/version", AUTH_LOGIN_URL, AUTH_VALIDATE_URL); diff --git a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java index b57103037e9..c51193c47b8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/authentication/UserSessionInitializerTest.java @@ -103,6 +103,8 @@ public class UserSessionInitializerTest { assertPathIsIgnored("/setup/index"); assertPathIsIgnored("/sessions/new"); assertPathIsIgnored("/sessions/logout"); + assertPathIsIgnored("/oauth2/callback/github"); + assertPathIsIgnored("/oauth2/callback/foo"); assertPathIsIgnored("/api/system/db_migration_status"); assertPathIsIgnored("/api/system/status"); assertPathIsIgnored("/api/system/migrate_db"); -- 2.39.5