Browse Source

fix checking

pull/7067/head 3.96
chrislu 2 months ago
parent
commit
1cba609bfa
  1. 3
      weed/admin/handlers/cluster_handlers.go

3
weed/admin/handlers/cluster_handlers.go

@ -1,7 +1,6 @@
package handlers package handlers
import ( import (
"math"
"net/http" "net/http"
"strconv" "strconv"
@ -251,7 +250,7 @@ func (h *ClusterHandlers) ShowEcVolumeDetails(c *gin.Context) {
} }
// Check that volumeID is within uint32 range // Check that volumeID is within uint32 range
if volumeID < 0 || volumeID > int(math.MaxUint32) {
if volumeID < 0 {
c.JSON(http.StatusBadRequest, gin.H{"error": "Volume ID out of range"}) c.JSON(http.StatusBadRequest, gin.H{"error": "Volume ID out of range"})
return return
} }

Loading…
Cancel
Save