mirror of https://github.com/2dust/v2rayN
Remove CoreAdminHandler password verification
This is useless since already handled in v2rayN/v2rayN.Desktop/Views/SudoPasswordInputView.axaml.cs with CheckSudoPasswordAsync().pull/7658/head
parent
4217397428
commit
653df33236
|
@ -50,17 +50,10 @@ public class CoreAdminHandler
|
|||
}
|
||||
};
|
||||
|
||||
var sudoVerified = false;
|
||||
DataReceivedEventHandler dataHandler = (sender, e) =>
|
||||
{
|
||||
if (e.Data.IsNotEmpty())
|
||||
{
|
||||
if (!sudoVerified && e.Data.Contains(_sudoAccessText))
|
||||
{
|
||||
sudoVerified = true;
|
||||
UpdateFunc(false, ResUI.SudoPwdVerfiedSuccessTip + Environment.NewLine);
|
||||
return;
|
||||
}
|
||||
UpdateFunc(false, e.Data + Environment.NewLine);
|
||||
}
|
||||
};
|
||||
|
@ -116,7 +109,7 @@ public class CoreAdminHandler
|
|||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine($"sudo -S echo \"{_sudoAccessText}\" && sudo -S {cmdLine}");
|
||||
sb.AppendLine($"sudo -S {cmdLine}");
|
||||
}
|
||||
|
||||
await File.WriteAllTextAsync(shFilePath, sb.ToString());
|
||||
|
|
Loading…
Reference in New Issue