Public-surface privacy consistency: hide exact coords; make public_enabled off actually stop exposure #60
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot#60
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(1) public_location.html:21 renders lat/lon to 4 decimal places (~11 m) on
the login-free page, contradicting the privacy rules the
/p/{token}pagesenforce (and test). Show name/zone/radar only.
(2) The NWS-alert branch of
/p/{token}(app/api/public.py:318-428) doesn'tfilter on
Location.public_enabled, unlike both SPC paths (public.py:239,spc_impacts.py:414); nothing revokes tokens when the flag is turned off, so
disabling public sharing leaves live NWS links serving until retention
expiry. Add the filter to the NWS branch and revoke-or-suspend the location's
tokens on toggle-off (suspend preserves re-enable).
Acceptance criteria:
Filed from the 2026-07-17 codebase audit (
docs/.internal/report-2026-07-17.md), finding F-21.Fixed in #93 (merged to
main). Three changes for one coherent posture: (1) the public location page no longer renders exact lat/lon (name/zone/radar only); (2) the NWS-alert branch of/p/{token}now filtersLocation.public_enabledlike the SPC branches already did, so a disabled location's links 404; (3) togglingpublic_enabledoff now revokes that location's NWS public tokens immediately (via the existingrevoke_public_tokenhelper) instead of leaving links live until retention expiry. SPC tokens are intentionally not revoked on toggle — they're shared across locations and already gated at render time. Tests cover the coord removal, the public_enabled gate, and token revocation on unshare.