Repository navigation
fix: extension refuses New Quizzes pages and pages under an assignment (#191) - #198
Merged
Merged
Conversation
#191) The guard now refuses a host that contains quiz-lti and every page under /courses/<id>/assignments/<id>/ except edit and build, and it collapses a doubled slash before it tests the URL. Tests, mutation cases 69c and 69d, PRIVACY.md and CHANGELOG. 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 #191.
The guard in
extension/content/extractor.jsnamed each bad route, so every unnamed New Quizzes route stayed readable. It now refuses by rule:quiz-lti. The New Quizzes LTI tool runs on*.quiz-lti-<region>-prod.instructure.com(Instructure domain list). The region varies, so the match is loose./courses/<id>/assignments/<id>/excepteditandbuild(taking,observing,exports,settings,peer_reviews, and routes I did not name).assignments/5//takingis refused. This also closes the same gap for the older routes.An independent review found three problems, all fixed here: a sub-path of
editorbuildwas readable, the doubled-slash bypass, and one sentence in PRIVACY.md that became too long.Tests: new blocked and still-readable URLs in
test/test-extractor.mjs(each new refusal fails on the old regex); mutation cases 69c (rewritten) and 69d (new), 29d anchor updated; all 218 anchors valid. Extension suite, smoke 655/655 and the doc check pass. Version stays 1.2.6: its CHANGELOG entries are still under Unreleased.Not verified: no live Canvas test. The host pattern comes from Instructure's domain list, and the Rails behaviour for
//is from memory. The extension reads only the top frame of a tab, so a quiz inside a Canvas page was never read. Uploading the extension to the Web Store is a separate step.🤖 Generated with Claude Code