fix(security): widget consents and shared files cleared on logout; forged shares refused (#266, #267) #429
Merged
jared
merged 1 commits from 2026-10-19 15:18:58 -04:00
fix/widget-share-hardening into lotus
No Reviewers
Labels
Clear labels
a11y
area: appearance
area: auth-session
area: build-ci
area: calls
area: desktop
area: media
area: messaging
area: mobile
area: moderation
area: navigation
area: notifications
area: settings
area: threads
bug
dependencies
docs
duplicate
enhancement
help wanted
invalid
needs-human-review
performance
planning
priority: critical
priority: high
priority: low
priority: medium
qa
question
research
security
tech-debt
ux
wontfix
Accessibility: keyboard, screen reader, contrast, motion
Client area: appearance
Client area: auth-session
Client area: build-ci
Client area: calls
Client area: desktop
Client area: media
Client area: messaging
Client area: mobile
Client area: moderation
Client area: navigation
Client area: notifications
Client area: settings
Client area: threads
Something is not working
Third-party package versions and advisories
README / LOTUS_* docs wrong or missing
This issue or pull request already exists
New feature
Need some help
Something is wrong
Re-render storms, leaks, heavy work on hot paths
Data loss, security hole, or crash on a main path
Broken feature or serious usability problem
Minor issue or polish
Wrong behaviour in an edge case or notable degradation
Manual QA: shipped, needs a human in a real environment
More information is needed
XSS, unsafe URLs, data leaks, auth/session
Code health, dead code, fragile patterns
Usability or visual inconsistency
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/cinny#429
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #266 and #267.
#266, widget consents
lotus.widgetConsent.<room>.<widget>) survived logout. They applied silently to the next account on the device, and their keys listed the previous account's rooms.clearPlaintextCachesnow sweeps the prefix. A test checks the prefix stays in sync withwidgetUtils; it's a string constant there so logout doesn't pull widget code into the entry chunk.PROTECTED_STATE_TYPESgainsm.space.child,m.space.parent,org.matrix.msc3401.call,org.matrix.msc3401.call.member,m.call.member,io.lotus.voice_limitandio.lotus.room_quality. No widget can be granted them, even with consent.#267, share target
Sec-Fetch-Site, but that header never reaches a service worker. I logged what the worker sees:accept, content-type, origin, sec-ch-ua…, with nosec-fetch-*. A check on it would have refused every real share. The worker now usesOrigin: it refuses a share from another site, and acceptsnull, an absent header (the OS share sheet's POST has no web initiator) or the app's own origin.Origin: null(sandboxed frame, no-referrer policy). So/sharenow says: "This came from another app or website. Check it before you send it." Sending still needs the user to pick a room.await clearSharedPayload(). The server-forced path inClientRootalso clears the soundboard clip cache, which #57 says every logout path must.Verified
localhost:8099) → dropped: lands on/home/, no trace of the text./sharewith the text and the new notice.I couldn't test a real Android share sheet here. The
null/absent acceptance is what keeps it working.🤖 Generated with Claude Code
https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5