oliver-zehentleitner / maity

web + hub: links with hidden characters never break a view; route segments can't leave the project path

Sign in to report

tsk-t232a5ttpeer Open

Hardening of the web client from the security rounds (tsk-v9kheekgq115).

To do:

  1. Links with invisible characters: a card link (card-panel.js linkItem) and a profile website (person.js) go through M.dom.safeUrl before h("a", {href}). h() drops a refused href and renders the text instead of throwing, so one bad value can't make a whole view unrenderable.
  2. The hub agrees with the client: board/links.py _plain_https and person_links.py website_problem refuse the same hidden set as safeUrl (Cf, bidi controls, DEL, U+2028/2029), in the path too.
  3. Route segments: app.js routing and api.js projectPath refuse . and .. segments, and segments that decode to /, so a crafted link can't point the client's API base at another hub path.
  4. Tests: web unit/e2e for each, and hub tests for the link and website checks. A changelog entry under Security.