aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Events/AniListBadges/EasterEvent2025
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-06-02 00:25:29 +0000
committerFuwn <[email protected]>2026-06-02 00:25:29 +0000
commit31b825b183bfae702c8ceb2fa48b29a4b830cf73 (patch)
tree6c14ae74185897bbf0957dc77fe214d4b022c12a /src/lib/Events/AniListBadges/EasterEvent2025
parentfix(updates): isolate feed failures so one feed can't break the page (diff)
downloaddue.moe-main.tar.xz
due.moe-main.zip
fix(security): sanitize badge_wall_css server-side, render via textContentHEADmain
Custom badge-wall CSS was sanitised only client-side with a fragile regex and injected via innerHTML, while the stored value stayed raw. Sanitise at the write boundary instead (setCSS, covering both the REST and GraphQL paths) with a css-tree pass that parses leniently and drops @import, behavior/-moz-binding, expression()/javascript: values, and </style> break-out attempts; render with textContent instead of innerHTML so break-out is impossible by construction (CSP already blocks inline script). css-tree stays server-only. A behaviour-gate test confirms ordinary CSS (backdrop-filter, content, url(), @media, @keyframes) is preserved while the dangerous constructs are removed. The previous regex also silently stripped all `content:` declarations; those now render correctly.
Diffstat (limited to 'src/lib/Events/AniListBadges/EasterEvent2025')
0 files changed, 0 insertions, 0 deletions