From 3636878bb7a6650d444d3432755db67f0ce5f824 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Sat, 28 Mar 2026 07:25:25 +0000 Subject: [PATCH] fix issue where users with larger pve task audit permission could cause a parse error when extracting vmid value from task without a vmid value --- app/routes/index.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/routes/index.go b/app/routes/index.go index f651e5e..f26b426 100644 --- a/app/routes/index.go +++ b/app/routes/index.go @@ -156,11 +156,14 @@ func GetClusterResources(auth common.Auth) (map[uint]InstanceCard, map[string]No if err != nil { return nil, nil, err } + + // try to get task vmid but continue if it would be an invalid vmid x, err := strconv.Atoi(task.ID) - task.VMID = uint(x) + // if there was an error converting the task's vmid, skip it if err != nil { - return nil, nil, err + continue } + task.VMID = uint(x) if task.User != auth.Username { // task was not made by user (ie was not a power on/off task) continue