mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:10:44 +00:00
fix(ios): harden gateway pairing setup
Harden iOS gateway setup-code pairing by rejecting non-loopback plaintext ws:// setup URLs before bootstrap token issuance, consolidating iOS setup parsing, and adding QR scan support from Settings.
Verification:
- pnpm test extensions/device-pair/index.test.ts
- swift test --package-path apps/shared/OpenClawKit --filter DeepLinksSecurityTests
- XcodeBuildMCP OpenClawLogicTests/DeepLinkParserTests
- targeted SwiftLint for touched iOS/OpenClawKit files
- pnpm exec oxfmt --check --threads=1 extensions/device-pair/index.ts extensions/device-pair/index.test.ts
- git diff --check origin/main...HEAD
- GitHub PR checks green on 58e5e60a5c
This commit is contained in:
@@ -113,7 +113,7 @@ If you use the `device-pair` plugin, you can do first-time device pairing entire
|
||||
1. In Telegram, message your bot: `/pair`
|
||||
2. The bot replies with two messages: an instruction message and a separate **setup code** message (easy to copy/paste in Telegram).
|
||||
3. On your phone, open the OpenClaw iOS app → Settings → Gateway.
|
||||
4. Paste the setup code and connect.
|
||||
4. Scan the QR code or paste the setup code and connect.
|
||||
5. Back in Telegram: `/pair pending` (review request IDs, role, and scopes), then approve.
|
||||
|
||||
The setup code is a base64-encoded JSON payload that contains:
|
||||
@@ -134,6 +134,13 @@ That bootstrap token carries the built-in pairing bootstrap profile:
|
||||
|
||||
Treat the setup code like a password while it is valid.
|
||||
|
||||
For Tailscale, public, or other non-loopback mobile pairing, use Tailscale
|
||||
Serve/Funnel or another `wss://` Gateway URL. Direct non-loopback `ws://` setup
|
||||
URLs are rejected before QR/setup-code issuance. Plaintext `ws://` setup codes
|
||||
are limited to loopback URLs; private-network `ws://` clients still require the explicit
|
||||
`OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1` break-glass described in the remote
|
||||
Gateway guide.
|
||||
|
||||
### Approve a node device
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user