Update mRemoteNG/Connection/Protocol/AnyDesk/ProtocolAnyDesk.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dimitrij
2025-10-20 22:31:42 +01:00
committed by GitHub
parent ed2fee3195
commit b6c21bb21f

View File

@@ -246,7 +246,8 @@ namespace mRemoteNG.Connection.Protocol.AnyDesk
{
// Use PowerShell to pipe the password to AnyDesk
// This is the recommended way according to AnyDesk documentation
string powershellCommand = $"echo '{_connectionInfo.Password}' | & '{anydeskPath}' {arguments}";
string escapedPassword = _connectionInfo.Password.Replace("'", "''");
string powershellCommand = $"echo '{escapedPassword}' | & '{anydeskPath}' {arguments}";
_process = new Process
{