Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Don't tell the system to open microsoft-edge URIs
Browse files Browse the repository at this point in the history
Could lead to an infinite loop.
  • Loading branch information
da2x committed Feb 13, 2017
1 parent c1b0f51 commit 5635f3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EdgeDeflector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ private static void RegisterProtocolHandler()
registeredapps_key.Close();
}

static bool IsBrowserUri(string uristring)
static bool IsUri(string uristring)
{
Uri uri = new Uri(uristring);
return (IsHttpUri(uristring) || IsMsEdgeUri(uristring)) && uri.IsWellFormedOriginalString();
return uri.IsWellFormedOriginalString();
}

static bool IsHttpUri(string uri)
Expand Down Expand Up @@ -125,7 +125,7 @@ static string RewriteMsEdgeUriSchema(string uri)

static void OpenUri(string uri)
{
if (!IsBrowserUri(uri))
if (!IsUri(uri) || !IsHttpUri(uri))
{
Environment.Exit(1);
}
Expand Down

0 comments on commit 5635f3b

Please sign in to comment.