-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 기록 상세 화면 감정 표시 개편 #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
문자열 치환 방식이 취약합니다 —
baseURL에/api/v1이 없으면 V2 URL이 V1과 동일해집니다.replacingOccurrences는 패턴이 없을 경우 원본 문자열을 그대로 반환합니다. 환경 설정 오류나 URL 형식 변경 시 V2 엔드포인트가 V1 API를 호출하게 되어 런타임에 발견하기 어려운 버그가 발생할 수 있습니다.치환 결과를 검증하는 assertion을 추가하는 것을 권장합니다.
🛡️ 방어적 검증 추가 제안
static let baseURLv2: String = { - // V1 URL에서 v2로 변경 - return baseURL.replacingOccurrences(of: "/api/v1", with: "/api/v2") + let v2URL = baseURL.replacingOccurrences(of: "/api/v1", with: "/api/v2") + assert(v2URL != baseURL, "baseURL에 '/api/v1' 경로가 포함되어 있지 않습니다. BASE_API_URL 환경 설정을 확인하세요.") + return v2URL }()🤖 Prompt for AI Agents