Skip to content

Commit

Permalink
Fix overly aggressive flag capture
Browse files Browse the repository at this point in the history
  • Loading branch information
rcmaehl authored Nov 16, 2023
1 parent bb1610e commit 3a8fadf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MSEdgeRedirect.au3
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,6 @@ Func _DecodeAndRun($sEdge = $aEdges[1], $sCMDLine = "")
Local $aCMDLine

Select
Case StringLeft($sCMDLine, 2) = "--"
If _GetSettingValue("RunUnsafe") Then
_SafeRun($sEdge, $sCMDLine)
Else
FileWrite($hLogs[$AppSecurity], _NowCalc() & " - " & "Blocked Unsafe Flag: " & $sCMDLine & @CRLF)
EndIf
Case StringInStr($sCMDLine, "--default-search-provider=?")
FileWrite($hLogs[$URIFailures], _NowCalc() & " - Skipped Settings URL: " & $sCMDLine & @CRLF)
Case StringInStr($sCMDLine, "profiles_settings")
Expand Down Expand Up @@ -624,6 +618,12 @@ Func _DecodeAndRun($sEdge = $aEdges[1], $sCMDLine = "")
FileWrite($hLogs[$URIFailures], _NowCalc() & " - Invalid URL: " & $sCMDLine & @CRLF)
EndIf
EndIf
Case StringLeft($sCMDLine, 2) = "--"
If _GetSettingValue("RunUnsafe") Then
_SafeRun($sEdge, $sCMDLine)
Else
FileWrite($hLogs[$AppSecurity], _NowCalc() & " - " & "Blocked Unsafe Flag: " & $sCMDLine & @CRLF)
EndIf
Case Else
$sCMDLine = StringRegExpReplace($sCMDLine, "(?i)(.*) microsoft-edge:[\/]*", "") ; Legacy Installs
$sCMDLine = StringReplace($sCMDLine, "?url=", "")
Expand Down

0 comments on commit 3a8fadf

Please sign in to comment.