fix(signup): make the captcha webview and handle domains follow the selected community - #175
Open
rishibalakrishnan wants to merge 3 commits into
Open
fix(signup): make the captcha webview and handle domains follow the selected community#175rishibalakrishnan wants to merge 3 commits into
rishibalakrishnan wants to merge 3 commits into
Conversation
The native captcha webview gated navigation on a static host allowlist that only covered Blacksky hosts. Once the community picker let signup target a third-party PDS, the gate page on that PDS was blocked: on iOS the initial load never rendered, and the captcha form post was blocked on both platforms. Derive the allowed host from the same serviceUrl the captcha URL is built from, so any current or future community PDS is covered. An unset or malformed serviceUrl adds nothing and leaves the static list unchanged.
Author
|
@github-actions ota |
|
Your requested OTA deployment was published to channel Note On-device apply works on TestFlight and development builds only. Production builds keep the anti-bricking safety net (
|
|
Native signup filtered handle domains using the ambient brand, which is pinned to the bundled Blacksky config while logged out. Picking a community changed the PDS but never its handle domains, so the handle step offered every domain the PDS advertises and defaulted to the first one. Fetch the selected community's published config and filter with that. Blacksky is fetched too, since the bundled copy can be stale. A failed or pending fetch leaves every advertised domain selectable rather than blocking the step — an extra domain on offer is cheaper to correct than a signup the user has to restart.
Author
|
@github-actions ota |
|
Your requested OTA deployment was published to channel Note On-device apply works on TestFlight and development builds only. Production builds keep the anti-bricking safety net (
|
…does not intersect Switching the hosting provider after picking a community updates serviceUrl but leaves selectedBrandSlug set, so the handle domains can be filtered against a PDS from a different community. That produced an empty list, no selectable suffix, and a handle the user could not make valid. Treat an empty intersection the same as a missing config: the PDS is the authority on what it accepts.
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.
Two native signup bugs that both come from reading community-specific values
from the wrong place. Bundled together so one OTA bundle can verify both.
1. Captcha webview blocks the community PDS
The webview gates navigation on a static host allowlist covering only Blacksky
hosts. Once the community picker let signup target another community's PDS, the
captcha page hosted there was blocked before any request was made — blank step
on iOS, and the form post is affected on Android.
Fixed by deriving the allowed host from the same
serviceUrlthe captcha URLis built from, so any current or future community PDS is covered without
editing a list. Unset or malformed
serviceUrladds nothing.2. Handle step ignores the community's handle domains
Signup filtered handle domains using the ambient brand, which is pinned to the
bundled Blacksky config while logged out. Picking a community changed the PDS
but never its handle domains, so the handle step offered everything the PDS
advertises and defaulted to the first entry — e.g. picking Latinsky produced a
.myatproto.socialsuffix.Fixed by fetching the selected community's published config and filtering with
that. Blacksky is fetched too, since the bundled copy can be stale.
A failed or pending fetch leaves every advertised domain selectable rather than
blocking the step: an extra domain on offer is cheaper to correct than a signup
the user has to restart.
Testing
buildAllowedHosts,filterUserDomains), covering bothfallback paths in each
Not device-verified. The tests cover the host and filter logic, not the
rendered steps — this needs a manual signup pass on iOS and Android: pick
Latinsky and confirm the suffix, pick Medsky and confirm the captcha renders.
Follow-up (not in this PR)
redirectHostinCaptchaWebViewis still hardcoded and should be derivedfrom the community config too.