fix(android): strip ws scheme prefix from manual gateway host input#99110
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 2:40 PM ET / 18:40 UTC. Summary PR surface: Other +79. Total +79 across 2 files. Reproducibility: yes. Source inspection shows current Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the endpoint-preservation fix after current-head Android CI finishes, keeping full URL handling in the shared Android resolver and preserving the IPv6 authority helper from current Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current Is this the best way to solve the issue? Yes. Preserving a complete pasted endpoint in the existing manual composer is narrower and safer than stripping schemes, because it keeps the endpoint parser as the single validation path and preserves IPv6 authority formatting from current AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 97ad0b7c211c. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Other +79. Total +79 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Reject bare ws:// in the Host field and normalize pasted ws:// LAN URLs so manual onboarding resolves the real hostname instead of host ws. Fixes openclaw#87216. Co-authored-by: Cursor <[email protected]>
6b46995 to
062a9da
Compare
|
Maintainer verification Before — pasting the complete WebSocket endpoint is rejected as an invalid gateway URL.
After — the same endpoint is accepted and advances to Gateway Recovery.
Maintainer rewrite:
Validation:
Proof gap: no live Gateway service was started; the real app path was verified through exact endpoint acceptance into connection recovery. Fixes #87216. |
|
Merged via squash.
|
…penclaw#99110) * fix(android): strip ws scheme prefix from manual gateway host input Reject bare ws:// in the Host field and normalize pasted ws:// LAN URLs so manual onboarding resolves the real hostname instead of host ws. Fixes openclaw#87216. Co-authored-by: Cursor <[email protected]> * fix(android): preserve complete manual gateway endpoints * fix(android): preserve gateway i18n inventory --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>


What Problem This Solves
Fixes #87216. Manual gateway onboarding advertised private LAN
ws://support, but users who typedws://(or pastedws://192.168.x.x) into the Host field got resolved endpoints likehttp://ws:18789, leading toprotocol mismatchbefore pairing could succeed.Why This Change Was Made
Add
normalizeManualGatewayHostInputto strip accidentalws:///wss:///http(s)://prefixes from the manual Host field, reject bare scheme-only input, and reuse the existing endpoint parser on the normalized hostname.User Impact
Manual LAN setup now resolves
HOST=ws://192.168.178.57,PORT=18789,TLS=offto host192.168.178.57instead of hostws. Barews://in Host is rejected instead of silently mis-parsing.Evidence
GatewayConfigResolverTest.kt:normalizeManualGatewayHostInput_rejectsBareWsSchemePrefixcomposeGatewayManualUrl_acceptsLanHostWithWsSchemePrefixresolveGatewayConnectConfigManual_acceptsLanHostWithWsSchemePrefixcd apps/android ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.ui.GatewayConfigResolverTest