SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
fix(volume): avoid panic when URL path has a dot before the comma (#9712)
Chris Luc3255b51fdc9
diff --git a/weed/storage/needle/needle.go b/weed/storage/needle/needle.goindex 7c0ce1c203..716ef99a78 100644--- a/weed/storage/needle/needle.go+++ b/weed/storage/needle/needle.go@@ -110,7 +110,8 @@ func CreateNeedleFromRequest(r *http.Request, fixJpgOrientation bool, sizeLimitcommaSep := strings.LastIndex(r.URL.Path, ",")dotSep := strings.LastIndex(r.URL.Path, ".")fid := r.URL.Path[commaSep+1:]- if dotSep > 0 {+ // dot must be after comma; otherwise path[commaSep+1:dotSep] panics+ if dotSep > commaSep {fid = r.URL.Path[commaSep+1 : dotSep]}