Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ private boolean isPublicEndpoint(HttpServletRequest request) {
return true;
}

if ("GET".equals(method) && pathMatcher.match("/api/v1/groups/**", path)) {
return true;
}

if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Comment on lines +135 to +138
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path pattern /api/v1/group appears to be a typo and doesn't match the pattern in SecurityConfig which uses /api/v1/groups. This inconsistency means the filter logic won't align with the security configuration, potentially causing authentication issues. Change this to /api/v1/groups to match the SecurityConfig pattern, or remove this check as it would be redundant with the /** pattern on line 131.

Suggested change
if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +138
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to SecurityConfig, if you correct the typo to /api/v1/groups, this check would be redundant since line 131 already covers /api/v1/groups/** which matches the base path as well. Consider removing this redundant check.

Suggested change
if ("GET".equals(method) && pathMatcher.match("/api/v1/group", path)) {
return true;
}

Copilot uses AI. Check for mistakes.
// SecurityEndpoints.PUBLIC_PATTERNS 체크
return Arrays.stream(SecurityEndpoints.PUBLIC_PATTERNS)
.anyMatch(pattern -> pathMatcher.match(pattern, path));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {

http
.authorizeHttpRequests((auth) -> auth
.requestMatchers(HttpMethod.GET, "/api/v1/users/*").permitAll()
.requestMatchers(HttpMethod.GET, "/api/v1/users/*").permitAll()
.requestMatchers(HttpMethod.GET, "/api/v1/groups/**").permitAll()
.requestMatchers(HttpMethod.GET, "/api/v1/groups").permitAll()
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern /api/v1/groups/** on line 34 already covers /api/v1/groups on line 35. The double asterisk pattern matches zero or more path segments, making line 35 redundant. You can remove line 35 to avoid duplication.

Suggested change
.requestMatchers(HttpMethod.GET, "/api/v1/groups").permitAll()

Copilot uses AI. Check for mistakes.
.requestMatchers(SecurityEndpoints.PUBLIC_PATTERNS).permitAll()
.anyRequest().authenticated()
);
Expand Down
Loading