Skip to content
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

#463 [Bug] ObjectId 검증 정규식 오타 수정 #464

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

withSang
Copy link
Member

@withSang withSang commented Feb 13, 2024

Summary

It fixes #463

ObjectId 검증 시 사용하는 정규식에 있는 오타를 수정합니다.

(현재) `^[a-fA-F\d]{24}$`
(수정) `^[a-fA-F\\d]{24}$` (백슬래시 이스케이프 문제)

현재 ajv의 validateBody 함수로 "/reports/create" API의 입력값을 검증할 때 objectIdPattern을 사용하기 때문에, 정상적인 피신고자의 ObjectId(reportedId)가 입력값 검증을 통과하지 못합니다.
참고로 다른 API에서는 아직 objectIdPattern을 바탕으로 입력값을 검증하지 않아서, 신고 생성 시에만 문제가 발생하고 있습니다.

Extra info

없음.

Images or Screenshots

image
  • 정규식 수정 이후 신고 생성 스크린샷

Further Work

  • 없음.

@withSang withSang linked an issue Feb 13, 2024 that may be closed by this pull request
Copy link
Member

@kmc7468 kmc7468 left a comment

Choose a reason for hiding this comment

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

이런 오타가 있었군요.. 수고하셨습니다! 저는 신고가 안되는지도 모르고 있었네요..

@kmc7468
Copy link
Member

kmc7468 commented Feb 13, 2024

혹시나 해서 lottery 모듈 쪽도 확인해 봤는데 여기는 괜찮네요!

Copy link
Contributor

@chlehdwon chlehdwon left a comment

Choose a reason for hiding this comment

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

헉... 전혀 생각 못한 큰 이슈가 있었군요.. 죄송합니다 죄송합니다 😭 고쳐주셔서 감사합니다!!

@withSang withSang merged commit 945c621 into dev Feb 13, 2024
1 check passed
@withSang withSang deleted the #463-bug-fix-objectidpattern branch February 13, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] ObjectId 검증 정규식 오타 수정
3 participants