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.
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
Further Work