Repository navigation
fix(app): read IPv6 hosts in the insecure-station check, and log unexpected teardown failures - #6
Merged
Merged
Conversation
…pected teardown failures
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.
Summary
Two fixes from the comment review (#5).
Insecure-station warning and IPv6.
hostOfsplit on:, so a bracketed IPv6 address came out as[or[2001. Neither contains a., andisLocalHosttreats a host without a dot as local, so a public IPv6 station on plain http never got the insecure warning. The check moves out ofonboarding.tsxinto a tested module:src/ ├── app/onboarding.tsx # setInsecure(isInsecureBase(base)) +└── lib/insecure-base.ts # hostOf, isLocalHost, isInsecureBaseteardowncatch.TrackPlayer.reset()errors were all swallowed. Now only RNTP'splayer_not_initializedis ignored, and any other failure goes to the playback log, so it shows up in Share playback log. It still doesn't throw, so a station switch or sign-out never half-completes.Evidence
hostOf('http://[::1]:3000')→"[",hostOf('http://[2001:db8::5]:8000')→"[2001", sohttp://[2001:db8::5]counted as local and got no warningAfter:
scripts/insecure-base.test.tspasses:::1and2001:db8::5are read correctly, public IPv6 over http is insecure, and::1,fd12:…andfe80::1are local.npm test498/498,tscclean, lint 0 errorsMerge Danger
Door: two-way
Blast Radius: onboarding
Only the http warning after a station check can change, and only for IPv6 hosts. Teardown behaves as before apart from the log line.