Skip to content

Commit ffc9b81

Browse files
Use invariant culture to prevent unintentional IP parsing
Some cultures uses comma as decimal separator which escapes this decimal check. Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
1 parent 0c51c41 commit ffc9b81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Plugins/Flow.Launcher.Plugin.Url

Plugins/Flow.Launcher.Plugin.Url/Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public bool IsURL(string raw)
8080
var input = raw.Trim();
8181

8282
// Exclude numbers (e.g. 1.2345)
83-
if (decimal.TryParse(input, out _))
83+
if (decimal.TryParse(input, System.Globalization.NumberStyles.Any, System.Globalization.CultureInfo.InvariantCulture, out _))
8484
return false;
8585

8686
// Check if it's a bare IP address with optional port, path, query, or fragment

0 commit comments

Comments
 (0)