From a80d79536a34fafc82922fd4c1eea5c7a62df99e Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Mon, 8 Jul 2024 10:37:35 -0700 Subject: [PATCH] removed cmt and prints --- cmd/copy_windows.go | 2 -- server/routes.go | 21 --------------------- 2 files changed, 23 deletions(-) diff --git a/cmd/copy_windows.go b/cmd/copy_windows.go index 4c210d34e..76a985a1d 100644 --- a/cmd/copy_windows.go +++ b/cmd/copy_windows.go @@ -4,7 +4,6 @@ package cmd import ( - "fmt" "os" "path/filepath" "syscall" @@ -42,7 +41,6 @@ func localCopy(src, target string) error { } func copyFileEx(src, dst string) error { - fmt.Println("HELELELLEEOEOEOEO") kernel32 := syscall.NewLazyDLL("kernel32.dll") copyFileEx := kernel32.NewProc("CopyFileExW") diff --git a/server/routes.go b/server/routes.go index a26dd6aad..4018ca287 100644 --- a/server/routes.go +++ b/server/routes.go @@ -943,10 +943,8 @@ func (s *Server) CreateBlobHandler(c *gin.Context) { c.Status(http.StatusOK) return } - fmt.Println("hello") fmt.Println(s.IsLocal(c)) if c.GetHeader("X-Redirect-Create") == "1" && s.IsLocal(c) { - fmt.Println("entered redirect") c.Header("LocalLocation", path) c.Status(http.StatusTemporaryRedirect) return @@ -967,8 +965,6 @@ func (s *Server) CreateBlobHandler(c *gin.Context) { } func (s *Server) IsLocal(c *gin.Context) bool { - fmt.Println("entered islocal") - fmt.Println(c.GetHeader("Authorization"), " is authorization") if authz := c.GetHeader("Authorization"); authz != "" { parts := strings.Split(authz, ":") if len(parts) != 3 { @@ -995,23 +991,6 @@ func (s *Server) IsLocal(c *gin.Context) bool { return false } - /* timestamp, err := strconv.ParseInt(partialRequestDataParts[2], 10, 0) - if err != nil { - return false - } - - t := time.Unix(timestamp, 0) - if time.Since(t) > 5*time.Minute || time.Until(t) > 5*time.Minute { - // token is invalid if timestamp +/- 5 minutes from current time - return false - } */ - - /* nonce := partialRequestDataParts[3] - if nonceCache.has(nonce) { - return false - } - nonceCache.add(nonce, 5*time.Minute) */ - signature, err := base64.StdEncoding.DecodeString(parts[2]) if err != nil { fmt.Println("failed at decodeString stdEncoding")