Repository navigation
fix: getParameterValues에서 앰퍼샌드도 이스케이프하도록 수정 - #233
Open
leejongyoung wants to merge 1 commit into
Open
leejongyoung wants to merge 1 commit into
leejongyoung wants to merge 1 commit into
Conversation
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.
수정 사유 Reason for modification
수정된 소스 내용 Modified source
getParameterValues("value")는 기존에A&B를 그대로 돌려준 반면getParameter("value")는A&B로 변환해서 돌려줬습니다. 이제 두 접근자 모두 기존 5문자 HTML 이스케이프 로직을 사용하며,StringBuffer와 기존 엔티티 이름은 그대로 둡니다.서블릿이 들고 있는 원본 파라미터가 바뀌지 않도록 배열을 복제해서 이스케이프합니다. 반복해서 읽어도 결과가 일정하고, 돌려받은 배열을 고쳐도 다음 읽기에는 영향을 주지 않습니다. null·순서·빈 값·유니코드·기존 스칼라 첫 값 의미·엔티티 형태 입력 처리·파라미터 맵 위임은 그대로 유지합니다. README에는 사용자가 보는 동작을 기록했습니다.
관련 포크 이슈: leejongyoung#4
의존성·인증·설정 변경 없음. 광범위한 XSS나 파라미터 맵 재설계 없음.
JUnit 테스트 JUnit tests
Maven 3.9.9, OpenJDK 21(Java release 17 컴파일):
mvn -B -ntp -Dtest=HTMLTagFilterRequestWrapperTest test: 7개 테스트, 실패·오류·건너뜀 0건. 수정 전 재현 테스트 5건은 모두 실패했습니다.HTMLTagFilter를 거친 실제 자동 HTTP 폼 POST: 5개 문자·반복 값/읽기·반환 배열 격리·누락/빈 값·유니코드·엔티티 형태 입력을 검증했습니다.mvn -B -ntp package --file pom.xml -DexcludedGroups=browser: BUILD SUCCESS, 415개 테스트, 실패·오류·건너뜀 0건.git diff --check: 통과.내장 컨테이너 검사는 전체 애플리케이션 DB/auth E2E가 아닙니다. browser 태그 테스트는 패키지 검사에서 제외했습니다.
테스트 브라우저 Test Browser
테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video
위 자동 단언과 Maven 테스트 결과로 백엔드 동작을 검증했습니다. 브라우저 UI 변경 없음.