From e26c2af20127f4074f346664ae6018eb076c3aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Tue, 17 Feb 2026 12:16:21 +0100 Subject: [PATCH] add uuid nil check --- handlers/workspace.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/handlers/workspace.go b/handlers/workspace.go index 4db252a..fc9b2b0 100644 --- a/handlers/workspace.go +++ b/handlers/workspace.go @@ -188,12 +188,19 @@ func (aH *AccessHandler) ReadWorkspaceData(c *gin.Context) { return } + if workspace.Uuid == uuid.Nil { + aH.logger.Error("ReadWorkspaceData", "uuid nil") + c.JSON(http.StatusBadRequest, nil) + return + } + files, err := os.ReadDir(workspace.Uuid.String()) if err != nil { aH.logger.Error("ReadWorkspaceData", err) c.JSON(http.StatusBadRequest, nil) return } + var response []string for _, f := range files { if f.IsDir() || !strings.Contains(filepath.Ext(f.Name()), ".db") {