Skip to content

fix: only trust location fixes Normal just received - #94

Merged
ykisana merged 1 commit into
mainfrom
location-fix-freshness
Nov 13, 2026
Merged

ykisana merged 1 commit into
mainfrom
location-fix-freshness

Conversation

@ykisana

@ykisana ykisana commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

A location key could pass on an old reading: setting the device clock back made the system's last-known location look fresh, and simulated locations passed too.

The unlock check now only reuses a reading Normal received in the last 30 s, and rejects stale, future-dated, invalid or simulated ones.

A location key could pass on an old fix: the unlock sheet trusted the
system's last-known location by its wall-clock timestamp, so setting the
device clock back made an hours-old fix look fresh. Simulated locations
also passed.

The unlock check now only reuses a fix Normal received in the last 30
seconds (measured on a monotonic clock), and rejects fixes that are stale,
dated in the future, invalid or simulated. The map's grey dot still uses
the last-known location.
@ykisana
ykisana merged commit 9d5801e into main Nov 13, 2026
2 checks passed
@ykisana
ykisana deleted the location-fix-freshness branch November 13, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant