Repository navigation
fix: getHref 결과를 LMS 출처로 제한 - #20
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
관련 이슈
Closes #19
변경 내용
getHref가new URL(href, base)결과의 origin 이BASE_LINK(https://learn.hansung.ac.kr) 와 다르면null을 반환한다. 다른 호스트·//evil·javascript:·data:·http 링크가 상세 요청 대상으로 쓰이지 않는다.parseCourses,fetchQuiz,fetchAssign,fetchVodList)는 이미null이면 해당 행을 버리므로 추가 수정 없음.javascript:등)를 가진 강좌·VOD·과제·퀴즈 행은 이제 결과에서 제외된다.fetchHtml이new URL(url, BASE_LINK).origin이 LMS 일 때만MoodleSession쿠키를 붙이고 그 외는 거부,redirect: 'manual'로 리다이렉트를 따라가며 쿠키가 새지 않게 함.test/dom.test.ts): 외부 호스트·유사 도메인·http·//evil·javascript:·data:→null케이스 추가. 외부 호스트(example.com)를 기대하던 기존 케이스는 LMS 주소로 교체. 상대/같은 출처 절대 경로 케이스는 그대로 통과.변경 유형
fix)feat)docs)refactor)style)perf)test)build,ci,chore,revert)체크리스트
npx prettier --check ./npm run lint/npm run build/npm run test가 통과합니다. (테스트 196개)🤖 Generated with Claude Code