From 8daf2571f847f70296d7b75ee0e53c5c9694cbea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 05:23:08 +0000 Subject: [PATCH] [gomod] Bump github.com/gofiber/fiber/v2 in /backend Bumps [github.com/gofiber/fiber/v2](https://github.com/gofiber/fiber) from 2.49.1 to 2.49.2. - [Release notes](https://github.com/gofiber/fiber/releases) - [Commits](https://github.com/gofiber/fiber/compare/v2.49.1...v2.49.2) --- updated-dependencies: - dependency-name: github.com/gofiber/fiber/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- backend/go.mod | 2 +- backend/go.sum | 3 ++- backend/vendor/github.com/gofiber/fiber/v2/app.go | 2 +- backend/vendor/github.com/gofiber/fiber/v2/ctx.go | 10 +++------- backend/vendor/gorm.io/gorm/{License => LICENSE} | 0 backend/vendor/modules.txt | 2 +- 6 files changed, 8 insertions(+), 11 deletions(-) rename backend/vendor/gorm.io/gorm/{License => LICENSE} (100%) diff --git a/backend/go.mod b/backend/go.mod index 0b7e0fca..90a79846 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-playground/validator/v10 v10.15.3 github.com/gofiber/adaptor/v2 v2.2.1 github.com/gofiber/contrib/otelfiber v1.0.10 - github.com/gofiber/fiber/v2 v2.49.1 + github.com/gofiber/fiber/v2 v2.49.2 github.com/gofiber/swagger v0.1.13 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/mock v1.6.0 diff --git a/backend/go.sum b/backend/go.sum index 04aab437..688bb0cc 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -126,8 +126,9 @@ github.com/gofiber/adaptor/v2 v2.2.1 h1:givE7iViQWlsTR4Jh7tB4iXzrlKBgiraB/yTdHs9 github.com/gofiber/adaptor/v2 v2.2.1/go.mod h1:AhR16dEqs25W2FY/l8gSj1b51Azg5dtPDmm+pruNOrc= github.com/gofiber/contrib/otelfiber v1.0.10 h1:Bu28Pi4pfYmGfIc/9+sNaBbFwTHGY/zpSIK5jBxuRtM= github.com/gofiber/contrib/otelfiber v1.0.10/go.mod h1:jN6AvS1HolDHTQHFURsV+7jSX96FpXYeKH6nmkq8AIw= -github.com/gofiber/fiber/v2 v2.49.1 h1:0W2DRWevSirc8pJl4o8r8QejDR8TV6ZUCawHxwbIdOk= github.com/gofiber/fiber/v2 v2.49.1/go.mod h1:nPUeEBUeeYGgwbDm59Gp7vS8MDyScL6ezr/Np9A13WU= +github.com/gofiber/fiber/v2 v2.49.2 h1:ONEN3/Vc+dUCxxDgZZwpqvhISgHqb+bu+isBiEyKEQs= +github.com/gofiber/fiber/v2 v2.49.2/go.mod h1:gNsKnyrmfEWFpJxQAV0qvW6l70K1dZGno12oLtukcts= github.com/gofiber/swagger v0.1.13 h1:e7tMH/y34HIMklQ2+uv64Ai3E8TWCgbZyscIx+IzInE= github.com/gofiber/swagger v0.1.13/go.mod h1:VtNHZdI5ksFlIR1R0vCcCX3/ruT8p9xNRX44958rsao= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= diff --git a/backend/vendor/github.com/gofiber/fiber/v2/app.go b/backend/vendor/github.com/gofiber/fiber/v2/app.go index 814294bd..5ec5d0db 100644 --- a/backend/vendor/github.com/gofiber/fiber/v2/app.go +++ b/backend/vendor/github.com/gofiber/fiber/v2/app.go @@ -30,7 +30,7 @@ import ( ) // Version of current fiber package -const Version = "2.49.1" +const Version = "2.49.2" // Handler defines a function to serve HTTP requests. type Handler = func(*Ctx) error diff --git a/backend/vendor/github.com/gofiber/fiber/v2/ctx.go b/backend/vendor/github.com/gofiber/fiber/v2/ctx.go index ddb1e61d..f409250a 100644 --- a/backend/vendor/github.com/gofiber/fiber/v2/ctx.go +++ b/backend/vendor/github.com/gofiber/fiber/v2/ctx.go @@ -1887,12 +1887,12 @@ func (c *Ctx) IsProxyTrusted() bool { return false } -var localHosts = [...]string{"127.0.0.1", "0.0.0.0", "::1"} +var localHosts = [...]string{"127.0.0.1", "::1"} // IsLocalHost will return true if address is a localhost address. func (*Ctx) isLocalHost(address string) bool { for _, h := range localHosts { - if strings.Contains(address, h) { + if address == h { return true } } @@ -1901,9 +1901,5 @@ func (*Ctx) isLocalHost(address string) bool { // IsFromLocal will return true if request came from local. func (c *Ctx) IsFromLocal() bool { - ips := c.IPs() - if len(ips) == 0 { - ips = append(ips, c.IP()) - } - return c.isLocalHost(ips[0]) + return c.isLocalHost(c.fasthttp.RemoteIP().String()) } diff --git a/backend/vendor/gorm.io/gorm/License b/backend/vendor/gorm.io/gorm/LICENSE similarity index 100% rename from backend/vendor/gorm.io/gorm/License rename to backend/vendor/gorm.io/gorm/LICENSE diff --git a/backend/vendor/modules.txt b/backend/vendor/modules.txt index da0070e4..c3cd5487 100644 --- a/backend/vendor/modules.txt +++ b/backend/vendor/modules.txt @@ -107,7 +107,7 @@ github.com/gofiber/adaptor/v2 # github.com/gofiber/contrib/otelfiber v1.0.10 ## explicit; go 1.18 github.com/gofiber/contrib/otelfiber -# github.com/gofiber/fiber/v2 v2.49.1 +# github.com/gofiber/fiber/v2 v2.49.2 ## explicit; go 1.20 github.com/gofiber/fiber/v2 github.com/gofiber/fiber/v2/internal/schema