Repository navigation
Security pass: private morning/review, own history after a swap, throttles, bounded export - #114
Merged
Merged
Conversation
…ier sign-in throttles, bounded export and imports, stricter owner addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
A security review of the server's routes found several gaps. Most need an account in the household (a partner or
view-only account); none lets a stranger in.
notes and the AI review. Their nights, stages and insights were already private.
side before the swap.
GET /api/exporttook anyhours, so one request could load the whole history into memory. Imported stagetimelines could start in 1970, with the same effect.
include a URL with a secret in it.
Fix
/morningand/reviewjoin the private reads (auth.PRIVATE_READS); the app only ever loads your own./api/historyreads non-owners' rows by person (store.history(person=...)); non-finitehoursfall back to the default.minutes. The dummy hash for unknown names is made once.
domain.object_id) and the address (http/https, never link-local), and itserrors no longer echo exception text.
?token=live-feed sign-in stays for older app versions; it can go once those have updated.Verification
tests/test_security_pass.py(9 tests), one for each change.test_auth.py, the notification tests,test_studio_sweep.pyandtest_cloud.pystill pass (116 tests together).publish_check.py: 0 hits.Release note
Security: a partner or view-only account can no longer read the other person's morning summary and review, and history
after swapping sides shows only your own nights. Sign-in and password changes are harder to guess at, and a few
owner-only settings check their addresses more strictly.