From 1b511655c455280c740d766df7b1fa806306f990 Mon Sep 17 00:00:00 2001 From: checkymander Date: Tue, 6 Feb 2024 12:27:50 -0500 Subject: [PATCH] update rm to validate params properly --- Payload_Type/athena/athena/agent_code/rm/rm.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Payload_Type/athena/athena/agent_code/rm/rm.cs b/Payload_Type/athena/athena/agent_code/rm/rm.cs index 2e68710e..8a9e89b1 100644 --- a/Payload_Type/athena/athena/agent_code/rm/rm.cs +++ b/Payload_Type/athena/athena/agent_code/rm/rm.cs @@ -21,6 +21,12 @@ public async Task Execute(ServerJob job) { RmArgs args = JsonSerializer.Deserialize(job.task.parameters); + if(!args.Validate(out string message)) + { + await messageManager.Write(message, job.task.id, true, "error"); + return; + } + try { FileAttributes attr = File.GetAttributes(args.path);