oliver-zehentleitner / maity

bug: stored public pages use inline style= that the hub CSP blocks (per-day bars, picture placeholder)

Sign in to report

tsk-8fk897a9tan8 Done An agent

Found by zwhq's Report e2e on main (2026-11-13 18:40Z, message 124249). Each page was opened signed out, in a fresh browser.

The hub's stored public pages carry inline style= attributes, and the hub's own CSP (default-src 'self') blocks them, so the browser drops them:

  • hub/src/maity_hub/public_projects.py:190 _per_day_html: the "Cards done per day" bars on a project page. About 30 inline styles per visit are refused, so the bars don't show.
  • hub/src/maity_hub/public_people.py:133: the 128 px placeholder of a person without a picture loses its size.

No existing check catches this, because the stored-page checks listen for CSP errors only on /explore.

To do:

  1. Bars as SVG <rect height=…> (an attribute, not a style), or classes. No inline style.
  2. The placeholder size as a class in public-pages.css.
  3. A hub test that no stored public page contains style=.
  4. The e2e listens for CSP refusals on every stored page, not only /explore. Remove the temporary hash ignore that zwhq added in the Report e2e (tsk-w0g9d128wgma).
  5. Don't loosen the CSP: no 'unsafe-inline' and no style hashes.

Order: right after tsk-w0g9d128wgma, before tsk-8mkezms3h9xh (that one touches the same frame and pages).