mirror of https://github.com/quasar/Quasar.git
MiscHandler validation
Added more restrictive validation for the "Misc" Handlers.
This commit is contained in:
parent
bf5b517eca
commit
81c9b238c8
|
@ -11,7 +11,7 @@ public static partial class CommandHandler
|
|||
{
|
||||
public static void HandleShellCommandResponse(Client client, ShellCommandResponse packet)
|
||||
{
|
||||
if (client.Value.FrmRs == null)
|
||||
if (client.Value.FrmRs == null || string.IsNullOrEmpty(packet.Output))
|
||||
return;
|
||||
|
||||
if (packet.IsError)
|
||||
|
@ -22,6 +22,9 @@ public static void HandleShellCommandResponse(Client client, ShellCommandRespons
|
|||
|
||||
public static void HandleDownloadFileResponse(Client client, DownloadFileResponse packet)
|
||||
{
|
||||
if (string.IsNullOrEmpty(packet.Filename))
|
||||
return;
|
||||
|
||||
if (!Directory.Exists(client.Value.DownloadDirectory))
|
||||
Directory.CreateDirectory(client.Value.DownloadDirectory);
|
||||
|
||||
|
|
Loading…
Reference in New Issue