@@ -95,12 +95,6 @@ private func agentAction(
9595 password : " def " ) ) )
9696 }
9797
98- @ Test func parseGatewayLinkRejectsInsecureNonLoopbackWs ( ) {
99- let url = URL (
100- string : " openclaw://gateway?host=attacker.example&port=18789&tls=0&token=abc " ) !
101- #expect ( DeepLinkParser . parse ( url ) == nil )
102- }
103-
10498 @ Test func parseGatewayLinkAllowsPrivateLanWs ( ) {
10599 let url = URL (
106100 string : " openclaw://gateway?host=openclaw.local&port=18789&tls=0&token=abc " ) !
@@ -115,12 +109,6 @@ private func agentAction(
115109 password : nil ) ) )
116110 }
117111
118- @ Test func parseGatewayLinkRejectsInsecurePrefixBypassHost ( ) {
119- let url = URL (
120- string : " openclaw://gateway?host=127.attacker.example&port=18789&tls=0&token=abc " ) !
121- #expect ( DeepLinkParser . parse ( url ) == nil )
122- }
123-
124112 @ Test func parseGatewayLinkRejectsInvalidPort ( ) {
125113 let url = URL ( string : " openclaw://gateway?host=gateway.example.com&port=70000&tls=1 " ) !
126114 #expect ( DeepLinkParser . parse ( url ) == nil )
@@ -179,31 +167,6 @@ private func agentAction(
179167 password : nil ) )
180168 }
181169
182- @ Test func parseGatewaySetupCodeRejectsInsecureNonLoopbackWs ( ) {
183- let payload = #"{"url":"ws://attacker.example:18789","bootstrapToken":"tok"}"#
184- let link = GatewayConnectDeepLink . fromSetupCode ( setupCode ( from : payload ) )
185- #expect ( link == nil )
186- }
187-
188- @ Test func parseGatewaySetupCodeRejectsInsecurePrefixBypassHost ( ) {
189- let payload = #"{"url":"ws://127.attacker.example:18789","bootstrapToken":"tok"}"#
190- let link = GatewayConnectDeepLink . fromSetupCode ( setupCode ( from : payload ) )
191- #expect ( link == nil )
192- }
193-
194- @ Test func parseGatewaySetupCodeAllowsLoopbackWs ( ) {
195- let payload = #"{"url":"ws://127.0.0.1:18789","bootstrapToken":"tok"}"#
196- let link = GatewayConnectDeepLink . fromSetupCode ( setupCode ( from : payload ) )
197-
198- #expect ( link == . init (
199- host : " 127.0.0.1 " ,
200- port : 18789 ,
201- tls : false ,
202- bootstrapToken : " tok " ,
203- token : nil ,
204- password : nil ) )
205- }
206-
207170 @ Test func parseGatewaySetupCodeAllowsPrivateLanWs ( ) {
208171 let payload = #"{"url":"ws://openclaw.local:18789","bootstrapToken":"tok"}"#
209172 let link = GatewayConnectDeepLink . fromSetupCode ( setupCode ( from : payload ) )
0 commit comments