We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b57e7b commit c9bfb64Copy full SHA for c9bfb64
1 file changed
BrowserStackLocal/BrowserStackLocal/BrowserStackTunnel.cs
@@ -237,6 +237,11 @@ private string fetchSourceUrl(string accessKey)
237
}
238
239
240
+ // Each guard below covers a case the final host-equals check does not:
241
+ // - null/empty URL: skip a parse attempt and give a clear error.
242
+ // - Uri.TryCreate failure: malformed URL surfaces our own exception instead of leaving parsed null.
243
+ // - HTTPS check: allowlist matches host only; without this, http://browserstack.com would pass.
244
+ // - null/empty host: parsed.Host can be empty for some URL forms; give a clear error before reaching the allowlist loop.
245
private static string ValidateSourceUrl(string url)
246
{
247
if (string.IsNullOrEmpty(url))
0 commit comments