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

관리자 xss 체크 alert이 너무 자주 발생하는 문제 #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

merong
Copy link

@merong merong commented Jan 12, 2024

관리자에서 xss 체크를 위한 정규식에 문제가 있습니다.
해당 문제는 정규식 패턴이 너무 광범위하게 잡혀 있습니다.
[onerror|onload] 의 경우 단어 매칭이 아닌 글자 하나씩 매칭을 시도함으로 거의 대부분의 문서가 조건을 만족하게 됩니다. 이로 인해 xss 오탐 케이스가 증가하고, 해당 기능을 주석처리하게 되는 상황이 발생할수 있습니다. 이에 onerror, onload 가 들어간 문장을 좀더 정형화하여 체크할수 있도록 정규식을 수정하였습니다.

관리자에서 xss 체크를 위한 정규식에 문제가 있습니다.
해당 문제는 정규식 패턴이 너무 광범위하게 잡혀 있습니다.
[onerror|onload] 의 경우 단어 매칭이 아닌 단어별로 매칭을 시도함으로 거의 대부분의 문서가 조건을 만족하게 됩니다.
이로 인해 xss 오탐 케이스가 증가하고, 해당 기능을 주석처리하게 되는 상황이 발생할수 있습니다. 이에 onerror, onload 가 들어간 문장을 좀더 정형화하여 체크할수 있도록 정규식을 수정하였습니다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants