fix(gateway): accept http aliases for loopback announce delivery#39064
fix(gateway): accept http aliases for loopback announce delivery#39064Narcooo wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Greptile SummaryThis PR fixes cron announce delivery for loopback gateways by teaching
Confidence Score: 5/5
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a099dcf85f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const protocol = | ||
| parsed.protocol === "https:" ? "wss:" : parsed.protocol === "http:" ? "ws:" : parsed.protocol; |
There was a problem hiding this comment.
Treat https alias consistently with wss in client TLS logic
Mapping https: to wss: here makes isSecureWebSocketUrl accept https://..., but the connection path still gates TLS pinning on the literal wss:// prefix (src/gateway/client.ts:113 and src/gateway/client.ts:147, and local auto-pinning in src/gateway/call.ts:520). In environments that set gateway.remote.tlsFingerprint (or depend on local TLS fingerprint auto-loading), an https:// URL now passes validation and then fails at connect time with gateway tls fingerprint requires wss:// gateway url, so the alias support introduced by this change is incomplete and breaks pinned-TLS usage.
Useful? React with 👍 / 👎.
Co-authored-by: Narcooo <[email protected]>
|
Landed. Thank you @Narcooo. What I did:
SHA hashes:
Thanks again for the fix. |
* main: (133 commits) reduce image size, offer slim image (openclaw#38479) fix(security): harden install base drift cleanup fix(agents): respect explicit provider baseUrl in merge mode (openclaw#39103) fix(agents): apply contextTokens cap for compaction threshold (openclaw#39099) fix(exec): block dangerous override-only env pivots fix(security): stage installs before publish fix(daemon): normalise whitespace in checkTokenDrift to prevent false-positive warning (openclaw#39108) fix(security): harden fs-safe copy writes refactor: dedupe bluebubbles webhook auth test setup refactor: dedupe discord native command test scaffolding refactor: dedupe anthropic probe target test setup refactor: dedupe minimax provider auth test setup refactor: dedupe runtime snapshot test fixtures fix: harden zip extraction writes fix(tests): stabilize diffs localReq headers (supersedes openclaw#39063) fix: harden workspace skill path containment fix(agents): land openclaw#38935 from @MumuTW fix(models): land openclaw#38947 from @davidemanuelDEV fix(gateway): land openclaw#39064 from @Narcooo fix(models-auth): land openclaw#38951 from @MumuTW ...
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]>
Co-authored-by: Narcooo <[email protected]> (cherry picked from commit 2f59a3c)
Co-authored-by: Narcooo <[email protected]> (cherry picked from commit 2f59a3c)
Summary
http:URLs likews:andhttps:likewss:in the secure gateway URL validatorProblem
Cron announce delivery can target loopback gateways with
http://127.0.0.1:<port>. The validator currently rejects those URLs before the ws client gets a chance to normalize them.Verification
PATH=/Users/majunxian/Desktop/PyProject/openclaw/node_modules/.bin:$PATH vitest run src/gateway/net.test.tsPATH=/Users/majunxian/Desktop/PyProject/openclaw/node_modules/.bin:$PATH oxfmt --check src/gateway/net.ts src/gateway/net.test.tsCloses #38882