forked from yencarnacion/html4tree
-
Notifications
You must be signed in to change notification settings - Fork 0
⚡ Bolt: 디렉토리 순회 시 CSS 해시 계산 최적화 #323
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
CSP 해시와 실제
<style>본문을 일치시키세요.Line [313]은
cssContent만 SHA-256으로 계산합니다. 그러나 Line [315]-[318]은<style>태그 안에cssContent앞의 개행과 뒤의 공백을 추가합니다. CSP는 해시가 실제 인라인 스타일 블록과 일치할 때만 스타일을 허용합니다. 공백도 해시 입력에 포함됩니다. (w3.org)현재 생성된 HTML에서는 CSS가 차단될 수 있습니다.
css가 태그 사이에cssContent만 포함하도록 구성하세요.src/test/kotlin/html4tree/MainTest.kt의 테스트도 태그 사이 본문을 해시하여 이 조건을 검증해야 합니다.수정 예시
internal val css = """ <style> -${cssContent} </style> +${cssContent}</style> """🤖 Prompt for AI Agents