Repository navigation
Refuse weather coordinates off the globe - #18810
Closed
ThePrimeagen wants to merge 1 commit into
Closed
ThePrimeagen wants to merge 1 commit into
ThePrimeagen wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
[Medium impact] The PR appears safe to merge. SummaryThe PR rejects weather coordinates outside latitude ±90 and longitude ±180.
No actionable issues found. Review was based on source inspection; tests were not run. Reviews (2) · Last reviewed commit: "Refuse weather coordinates off the globe" · Reviewed by Greptile |
Collaborator
|
Closing as a duplicate of #18553: the same range check, which also stops a failed write from emptying weather.json. Reviewed by Claude Opus 5.5 with Codex Medium as a second opinion; its independence is not guaranteed. |
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.
omarchy-weather-location --set Home 91,181saves a place off the globe and exits 0, becausebin/omarchy-weather-locationchecks only that the pair looks like two numbers. After the next shell start the bar's weather icon is gone and the panel sits on "Fetching forecast…", andparseLocationFileinshell/plugins/panels/weather/Model.jslets a hand-writtenweather.jsondo the same.Screenshots
Reproduce
omarchy-weather-location --set Home 91,181; echo $?: it prints0.cat ~/.local/state/omarchy/settings/weather.json: it holds"latitude":91,"longitude":181.omarchy-restart-shelland wait a minute: the weather icon never appears in the top bar.omarchy-notification-weather: the panel shows no temperature, only "Fetching forecast…".More cases
A
weather.jsonwritten by hand at 91,181, after a shell restartJust past the other edges,
-91,0,0,-181,90.0001,0,0,180.0001, and a pair typed longitude firstRelated
--setline this change edits