Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @k3vin7, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 비밀번호 유효성 검사 로직의 일관성을 확보하고 사용자 경험을 개선하기 위해 PasswordRequestDto에 사용되는 비밀번호 정규식을 업데이트합니다. 기존에는 특정 특수문자만 허용하여 일부 문자가 포함된 비밀번호가 거부되는 문제가 있었으나, 이번 변경으로 모든 특수문자를 허용하도록 정규식을 확장하여 비밀번호 재설정 및 변경 시 발생하던 오류를 해결했습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| @get:Pattern( | ||
| regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%^&*()]).{10,}\$", | ||
| regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9]).{10,}\$", | ||
| message = "비밀번호는 영어 대문자와 소문자, 숫자, 특수문자를 모두 포함하여 10자 이상이어야 합니다" | ||
| ) |
There was a problem hiding this comment.
비밀번호 유효성 검사 정규식과 메시지가 여러 DTO에 중복으로 정의되어 있습니다. 이는 향후 비밀번호 정책 변경 시 여러 파일을 수정해야 하는 번거로움과 실수를 유발할 수 있습니다.
공통 상수로 분리하여 재사용성을 높이고 유지보수를 용이하게 하는 것을 권장합니다. 예를 들어, common 패키지 하위에 ValidationConstants와 같은 객체를 만들어 관리할 수 있습니다.
// common/validation/ValidationConstants.kt
object ValidationConstants {
const val PASSWORD_REGEX = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9]).{10,}\$"
const val PASSWORD_MESSAGE = "비밀번호는 영어 대문자와 소문자, 숫자, 특수문자를 모두 포함하여 10자 이상이어야 합니다"
}이렇게 하면 DTO에서는 다음과 같이 간결하게 사용할 수 있습니다.
@get:Pattern(
regexp = ValidationConstants.PASSWORD_REGEX,
message = ValidationConstants.PASSWORD_MESSAGE
)| @get:Pattern( | ||
| regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%^&*()]).{10,}\$", | ||
| regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9]).{10,}\$", | ||
| message = "비밀번호는 영어 대문자와 소문자, 숫자, 특수문자를 모두 포함하여 10자 이상이어야 합니다" | ||
| ) |
Summary
[!@#$%^&*()](9개 특수문자만 허용) → 변경:[^a-zA-Z0-9](모든 특수문자 허용)~등 특수문자가 비밀번호 재설정/변경 시 거부되던 문제 해결Test plan
~포함 비밀번호로 재설정/변경 정상 동작 확인🤖 Generated with Claude Code