diff --git a/go.mod b/go.mod index d376c3d209..60e82d1ba7 100644 --- a/go.mod +++ b/go.mod @@ -104,7 +104,7 @@ require ( go.opentelemetry.io/otel/trace v1.30.0 golang.org/x/crypto v0.27.0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 - golang.org/x/image v0.19.0 + golang.org/x/image v0.20.0 golang.org/x/net v0.29.0 golang.org/x/oauth2 v0.22.0 golang.org/x/sync v0.8.0 diff --git a/go.sum b/go.sum index c463116fbb..2e660f0df9 100644 --- a/go.sum +++ b/go.sum @@ -1314,8 +1314,8 @@ golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.19.0 h1:D9FX4QWkLfkeqaC62SonffIIuYdOk/UE2XKUBgRIBIQ= -golang.org/x/image v0.19.0/go.mod h1:y0zrRqlQRWQ5PXaYCOMLTW2fpsxZ8Qh9I/ohnInJEys= +golang.org/x/image v0.20.0 h1:7cVCUjQwfL18gyBJOmYvptfSHS8Fb3YUDtfLIZ7Nbpw= +golang.org/x/image v0.20.0/go.mod h1:0a88To4CYVBAHp5FXJm8o7QbUl37Vd85ply1vyD8auM= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/vendor/github.com/tus/tusd/v2/pkg/handler/unrouted_handler.go b/vendor/github.com/tus/tusd/v2/pkg/handler/unrouted_handler.go index 385bf1c3f1..73be46437e 100644 --- a/vendor/github.com/tus/tusd/v2/pkg/handler/unrouted_handler.go +++ b/vendor/github.com/tus/tusd/v2/pkg/handler/unrouted_handler.go @@ -199,7 +199,6 @@ func (handler *UnroutedHandler) Middleware(h http.Handler) http.Handler { if origin := r.Header.Get("Origin"); !cors.Disable && origin != "" { originIsAllowed := cors.AllowOrigin.MatchString(origin) if !originIsAllowed { - fmt.Println("ORIGIN IS NOT ALLOWED", origin) handler.sendError(c, ErrOriginNotAllowed) return } @@ -692,14 +691,12 @@ func (handler *UnroutedHandler) HeadFile(w http.ResponseWriter, r *http.Request) // PatchFile adds a chunk to an upload. This operation is only allowed // if enough space in the upload is left. func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request) { - fmt.Println("PATCH FILE") c := handler.getContext(w, r) isTusV1 := !handler.usesIETFDraft(r) // Check for presence of application/offset+octet-stream if isTusV1 && r.Header.Get("Content-Type") != "application/offset+octet-stream" { - fmt.Println("WRONG CONTENT TYPE") handler.sendError(c, ErrInvalidContentType) return } @@ -707,14 +704,12 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request // Check for presence of a valid Upload-Offset Header offset, err := strconv.ParseInt(r.Header.Get("Upload-Offset"), 10, 64) if err != nil || offset < 0 { - fmt.Println("WRONG OFFSET") handler.sendError(c, ErrInvalidOffset) return } id, err := extractIDFromPath(r.URL.Path) if err != nil { - fmt.Println("WRONG ID") handler.sendError(c, err) return } @@ -723,7 +718,6 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request if handler.composer.UsesLocker { lock, err := handler.lockUpload(c, id) if err != nil { - fmt.Println("WRONG LOCK") handler.sendError(c, err) return } @@ -733,27 +727,23 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request upload, err := handler.composer.Core.GetUpload(c, id) if err != nil { - fmt.Println("WRONG UPLOAD") handler.sendError(c, err) return } info, err := upload.GetInfo(c) if err != nil { - fmt.Println("WRONG INFO") handler.sendError(c, err) return } // Modifying a final upload is not allowed if info.IsFinal { - fmt.Println("WRONG FINAL") handler.sendError(c, ErrModifyFinal) return } if offset != info.Offset { - fmt.Println("WRONG INFO OFFSET") handler.sendError(c, ErrMismatchOffset) return } @@ -770,32 +760,27 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request // Do not proxy the call to the data store if the upload is already completed if !info.SizeIsDeferred && info.Offset == info.Size { resp.Header["Upload-Offset"] = strconv.FormatInt(offset, 10) - fmt.Println("UPLOAD ALREADY COMPLETED") handler.sendResp(c, resp) return } if r.Header.Get("Upload-Length") != "" { if !handler.composer.UsesLengthDeferrer { - fmt.Println("UPLOAD LENGTH DEFERRER") handler.sendError(c, ErrNotImplemented) return } if !info.SizeIsDeferred { - fmt.Println("UPLOAD LENGTH NOT DEFERED") handler.sendError(c, ErrInvalidUploadLength) return } uploadLength, err := strconv.ParseInt(r.Header.Get("Upload-Length"), 10, 64) if err != nil || uploadLength < 0 || uploadLength < info.Offset || (handler.config.MaxSize > 0 && uploadLength > handler.config.MaxSize) { - fmt.Println("UPLOAD LENGTH INVALID") handler.sendError(c, ErrInvalidUploadLength) return } lengthDeclarableUpload := handler.composer.LengthDeferrer.AsLengthDeclarableUpload(upload) if err := lengthDeclarableUpload.DeclareLength(c, uploadLength); err != nil { - fmt.Println("UPLOAD LENGTH DECLARED") handler.sendError(c, err) return } @@ -806,7 +791,6 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request resp, err = handler.writeChunk(c, resp, upload, info) if err != nil { - fmt.Println("CANT WRITE CHUNK") handler.sendError(c, err) return } @@ -815,7 +799,6 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request if willCompleteUpload && info.SizeIsDeferred { info, err = upload.GetInfo(c) if err != nil { - fmt.Println("CANT GET INFO") handler.sendError(c, err) return } @@ -824,7 +807,6 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request lengthDeclarableUpload := handler.composer.LengthDeferrer.AsLengthDeclarableUpload(upload) if err := lengthDeclarableUpload.DeclareLength(c, uploadLength); err != nil { - fmt.Println("CANT UPLOAD LENGTH") handler.sendError(c, err) return } @@ -834,14 +816,12 @@ func (handler *UnroutedHandler) PatchFile(w http.ResponseWriter, r *http.Request resp, err = handler.finishUploadIfComplete(c, resp, upload, info) if err != nil { - fmt.Println("CANT COMPLETE") handler.sendError(c, err) return } } handler.sendResp(c, resp) - fmt.Println("PATCH COMPLETE") } // writeChunk reads the body from the requests r and appends it to the upload diff --git a/vendor/modules.txt b/vendor/modules.txt index 37e89f393e..a3f284b1df 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2169,7 +2169,7 @@ golang.org/x/exp/slices golang.org/x/exp/slog golang.org/x/exp/slog/internal golang.org/x/exp/slog/internal/buffer -# golang.org/x/image v0.19.0 +# golang.org/x/image v0.20.0 ## explicit; go 1.18 golang.org/x/image/bmp golang.org/x/image/ccitt