Repository navigation
[BE-fix] boolean 필드에 문자열이 true로 변환되어 통과하던 문제 수정 - #28
Merged
Merged
Conversation
전역 ValidationPipe의 enableImplicitConversion 때문에 @isboolean 필드에 "false"·"YES"·1 같은 값이 Boolean(값)으로 바뀌어 통과했다. 자기선언 동의에 "false" 문자열을 보내면 동의한 것으로 저장될 수 있었다. - 변환 전 원래 값으로 검사하는 @StrictBoolean() 데코레이터 추가 (src/core) - 자기선언 동의 3종, 질문 템플릿 required·evaluationEnabled에 적용 - 전역 설정(main.ts)은 변경하지 않음 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
💡 개요
boolean 필드에
"false"같은 문자열을 보내면true로 바뀌어 통과하던 문제를 고칩니다.자기선언 동의에
"false"를 보내면 동의한 것으로 저장될 수 있었습니다.🐞 원인
enableImplicitConversion: true가 검증 전에 값을Boolean(값)으로 변환"false","YES",1등이 모두true가 되어@IsBoolean()을 통과📌 변경 사항
@StrictBoolean()데코레이터 추가 (src/core)required·evaluationEnabledmain.ts)은 변경 없음true/false만 통과하고, 나머지는 400📖 참고
✅ 검증