1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-19 02:17:38 +03:00

[Security] Remove ExecutionPolicy Command

This command isn't needed and opens EDMC to a potential security bug.
This commit is contained in:
David Sangrey 2025-02-16 21:12:19 -05:00
parent 2b95a3eece
commit 1a93396047
No known key found for this signature in database
GPG Key ID: 3AEADBB0186884BC

View File

@ -80,7 +80,7 @@ begin
begin
PowerShellOutputFile := ExpandConstant('{tmp}\PowershellOutput.txt');
// Construct the PowerShell command and capture output to a file
Exec('powershell.exe', '-NoProfile -ExecutionPolicy Bypass -Command "Get-WmiObject -Class Win32_Product | where Name -eq ''Elite Dangerous Market Connector'' | select-object -expandproperty IdentifyingNumber" | Out-File -Encoding ASCII "' + PowerShellOutputFile + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
Exec('powershell.exe', '-NoProfile -Command "Get-WmiObject -Class Win32_Product | where Name -eq ''Elite Dangerous Market Connector'' | select-object -expandproperty IdentifyingNumber" | Out-File -Encoding ASCII "' + PowerShellOutputFile + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
begin
if LoadStringFromFile(PowerShellOutputFile, S) then
S:= Trim(S);