mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-18 17:03:56 -05:00
[PR #1833] [MERGED] fix(staffml): pin bootstrap-icons CSS with SRI + crossorigin #29115
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1833
Author: @farhan523
Created: 6/3/2026
Status: ✅ Merged
Merged: 6/10/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/ecosystembar-cdn-sri📝 Commits (1)
34d4a7ffix(staffml): pin bootstrap-icons CSS with SRI + crossorigin📊 Changes
1 file changed (+18 additions, -1 deletions)
View changed files
📝
interviews/staffml/src/components/EcosystemBar.tsx(+18 -1)📄 Description
Summary
EcosystemBarinjected the bootstrap-icons stylesheet from jsDelivr with nointegrityattribute. If jsDelivr was ever compromised or its CDN served modified bytes, the browser would apply the foreign CSS on every StaffML pageview.Changes
integrity=\"sha384-…\"pinning the v1.11.3 bytes. Hash computed from the actual CDN file:crossOrigin=\"anonymous\"— required for SRI to be enforced on cross-origin resources.onerrorhandler that logs to console (with the recompute recipe) when the stylesheet is rejected. Without it the only symptom of a stale hash (e.g. after a version bump) would be silently missing icons across the bar.Test plan
npx tsc --noEmit→ unchanged (the 2 pre-existing errors ondevaboutkatex/js-quantitiesare local-env-only; those packages are declared inpackage.jsonbut missing from localnode_modulesuntilnpm installruns)devfail with the same stash-in / stash-out behavior — unrelated to this PR.console.errorfires with the recompute recipe.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.