Skip to content

Commit

Permalink
Check for blank UID in server requests (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmholmes authored May 14, 2024
1 parent 30d2938 commit 578f05c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/grafana/dashboard-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ func (h *DashboardHandler) DashboardJSONPostHandler(s grizzly.Server) http.Handl
return
}
uid, ok := resp.Dashboard["uid"].(string)
if !ok {
if !ok || uid == "" {
grizzly.SendError(w, "Dashboard has no UID", fmt.Errorf("dashboard has no UID"), 400)
return
}
Expand Down

0 comments on commit 578f05c

Please sign in to comment.