Skip to content

fix(android): normalize IPv6 zone IDs in gateway endpoint hosts#99560

Closed
ly85206559 wants to merge 1 commit into
openclaw:mainfrom
ly85206559:fix/android-gateway-ipv6-zone-host
Closed

fix(android): normalize IPv6 zone IDs in gateway endpoint hosts#99560
ly85206559 wants to merge 1 commit into
openclaw:mainfrom
ly85206559:fix/android-gateway-ipv6-zone-host

Conversation

@ly85206559

Copy link
Copy Markdown
Contributor

What Problem This Solves

IPv6 zone URLs such as ws://[fe80::1%25eth0] passed cleartext validation but stored %25eth0 in the connection host, which can break socket connect even though cleartext policy checks strip the zone.

Why This Change Was Made

Normalize gateway endpoint hosts with normalizeGatewayConnectionHost so parsed hosts are socket-ready literals like fe80::1.

User Impact

Link-local IPv6 manual/QR gateway URLs connect using bare IPv6 literals.

Evidence

  • Updated GatewayConfigResolverTest.parseGatewayEndpointAllowsLinkLocalIpv6ZoneCleartextWsUrls
  • Updated GatewayConfigResolverTest.parseGatewayEndpointAllowsSecureIpv6ZoneUrls
cd apps/android
./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.ui.GatewayConfigResolverTest.parseGatewayEndpointAllowsLinkLocalIpv6ZoneCleartextWsUrls --tests ai.openclaw.app.ui.GatewayConfigResolverTest.parseGatewayEndpointAllowsSecureIpv6ZoneUrls

Strip interface zones during endpoint parsing so link-local URLs like
ws://[fe80::1%25eth0] connect using socket-ready literals such as fe80::1.

Co-authored-by: Cursor <[email protected]>
@clawsweeper

clawsweeper Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(android): normalize IPv6 zone IDs in gateway endpoint hosts This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@ly85206559

Copy link
Copy Markdown
Contributor Author

Queued behind earlier Android fixes in this batch. Will open after prior PRs land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant