From b9fa931517ec1e76834c7816ecc97f63b8156784 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 04:05:22 +0000 Subject: [PATCH] Bump the go-modules-updates group in /backend with 2 updates Bumps the go-modules-updates group in /backend with 2 updates: [github.com/go-pkgz/rest](https://github.com/go-pkgz/rest) and [golang.org/x/net](https://github.com/golang/net). Updates `github.com/go-pkgz/rest` from 1.20.4 to 1.20.6 - [Release notes](https://github.com/go-pkgz/rest/releases) - [Commits](https://github.com/go-pkgz/rest/compare/v1.20.4...v1.20.6) Updates `golang.org/x/net` from 0.47.0 to 0.48.0 - [Commits](https://github.com/golang/net/compare/v0.47.0...v0.48.0) --- updated-dependencies: - dependency-name: github.com/go-pkgz/rest dependency-version: 1.20.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: go-modules-updates - dependency-name: golang.org/x/net dependency-version: 0.48.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-modules-updates ... Signed-off-by: dependabot[bot] --- backend/go.mod | 12 +- backend/go.sum | 24 ++-- .../github.com/go-pkgz/rest/.golangci.yml | 107 +++++++++--------- .../vendor/github.com/go-pkgz/rest/README.md | 9 +- .../github.com/go-pkgz/rest/blackwords.go | 3 +- .../github.com/go-pkgz/rest/file_server.go | 2 + .../github.com/go-pkgz/rest/logger/logger.go | 6 +- .../vendor/github.com/go-pkgz/rest/metrics.go | 3 +- .../github.com/go-pkgz/rest/middleware.go | 20 ++-- .../vendor/github.com/go-pkgz/rest/nocache.go | 13 ++- .../github.com/go-pkgz/rest/onlyfrom.go | 6 +- .../github.com/go-pkgz/rest/realip/real.go | 82 +++++++++----- .../golang.org/x/sync/errgroup/errgroup.go | 4 +- backend/vendor/golang.org/x/sys/cpu/cpu.go | 3 - .../vendor/golang.org/x/sys/cpu/cpu_arm64.go | 20 +--- .../vendor/golang.org/x/sys/cpu/cpu_arm64.s | 7 -- .../golang.org/x/sys/cpu/cpu_gc_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_gccgo_arm64.go | 1 - .../golang.org/x/sys/cpu/cpu_netbsd_arm64.go | 2 +- .../golang.org/x/sys/cpu/cpu_openbsd_arm64.go | 2 +- .../vendor/golang.org/x/sys/unix/mkerrors.sh | 3 +- .../golang.org/x/sys/unix/zerrors_linux.go | 2 + .../x/sys/unix/zerrors_linux_386.go | 2 + .../x/sys/unix/zerrors_linux_amd64.go | 2 + .../x/sys/unix/zerrors_linux_arm.go | 2 + .../x/sys/unix/zerrors_linux_arm64.go | 2 + .../x/sys/unix/zerrors_linux_loong64.go | 2 + .../x/sys/unix/zerrors_linux_mips.go | 2 + .../x/sys/unix/zerrors_linux_mips64.go | 2 + .../x/sys/unix/zerrors_linux_mips64le.go | 2 + .../x/sys/unix/zerrors_linux_mipsle.go | 2 + .../x/sys/unix/zerrors_linux_ppc.go | 2 + .../x/sys/unix/zerrors_linux_ppc64.go | 2 + .../x/sys/unix/zerrors_linux_ppc64le.go | 2 + .../x/sys/unix/zerrors_linux_riscv64.go | 2 + .../x/sys/unix/zerrors_linux_s390x.go | 2 + .../x/sys/unix/zerrors_linux_sparc64.go | 2 + .../x/sys/unix/ztypes_netbsd_arm.go | 2 +- .../x/text/encoding/japanese/eucjp.go | 6 +- .../x/text/encoding/japanese/iso2022jp.go | 6 +- .../x/text/encoding/japanese/shiftjis.go | 6 +- .../x/text/encoding/korean/euckr.go | 6 +- .../x/text/encoding/simplifiedchinese/gbk.go | 20 ++-- .../encoding/simplifiedchinese/hzgb2312.go | 6 +- .../text/encoding/traditionalchinese/big5.go | 6 +- .../x/text/encoding/unicode/unicode.go | 6 +- backend/vendor/modules.txt | 14 +-- 47 files changed, 238 insertions(+), 202 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index 6c32e1b..544688e 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -5,14 +5,14 @@ go 1.25.0 require ( github.com/PuerkitoBio/goquery v1.11.0 github.com/go-pkgz/lgr v0.12.1 - github.com/go-pkgz/rest v1.20.4 + github.com/go-pkgz/rest v1.20.6 github.com/go-pkgz/routegroup v1.6.0 github.com/jessevdk/go-flags v1.6.1 github.com/kennygrant/sanitize v1.2.4 github.com/mauidude/go-readability v0.0.0-20220221173116-a9b3620098b7 github.com/stretchr/testify v1.11.1 go.mongodb.org/mongo-driver v1.17.6 - golang.org/x/net v0.47.0 + golang.org/x/net v0.48.0 ) require ( @@ -26,9 +26,9 @@ require ( github.com/xdg-go/scram v1.2.0 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect - golang.org/x/crypto v0.45.0 // indirect - golang.org/x/sync v0.18.0 // indirect - golang.org/x/sys v0.38.0 // indirect - golang.org/x/text v0.31.0 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/text v0.32.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index 31d04cb..578770b 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -52,8 +52,8 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-pkgz/lgr v0.12.1 h1:8GVfG2rSARq3Eaj5PP158rtBR2LHVGkwioIkQBGbvKg= github.com/go-pkgz/lgr v0.12.1/go.mod h1:A4AxjOthFVFK6jRnVYMeusno5SeDAxcLVHd0kI/lN/Y= -github.com/go-pkgz/rest v1.20.4 h1:8ufcP1IqoDhCvIFdXPtvyX4HSS16SM6THBe2a6L0/kg= -github.com/go-pkgz/rest v1.20.4/go.mod h1:2/LEZGndSxpVvExsMn48AjUgiTn6kILqjpoaRnl62JU= +github.com/go-pkgz/rest v1.20.6 h1:O/IhQ3I2cS4bJYvL1TLcy63w2OcXZTTBG3R+wTIqPS4= +github.com/go-pkgz/rest v1.20.6/go.mod h1:NY+MX1is2kJckJt+nHDNovS/5j9jmF4yQuSno4qg7XU= github.com/go-pkgz/routegroup v1.6.0 h1:44XHZgF6JIIldRlv+zjg6SygULASmjifnfIQjwCT0e4= github.com/go-pkgz/routegroup v1.6.0/go.mod h1:Pmu04fhgWhRtBMIJ8HXppnnzOPjnL/IEPBIdO2zmeqg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -219,8 +219,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= -golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -269,8 +269,8 @@ golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -285,8 +285,8 @@ golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -311,8 +311,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -334,8 +334,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/backend/vendor/github.com/go-pkgz/rest/.golangci.yml b/backend/vendor/github.com/go-pkgz/rest/.golangci.yml index ec36f9d..bd6fb4a 100644 --- a/backend/vendor/github.com/go-pkgz/rest/.golangci.yml +++ b/backend/vendor/github.com/go-pkgz/rest/.golangci.yml @@ -1,66 +1,63 @@ +version: "2" run: timeout: 5m tests: false - -linters-settings: - govet: - enable: - - shadow - goconst: - min-len: 2 - min-occurrences: 2 - misspell: - locale: US - lll: - line-length: 140 - gocritic: - enabled-tags: - - performance - - style - - experimental - disabled-checks: - - wrapperFunc - - hugeParam - - rangeValCopy - - singleCaseSwitch - - ifElseChain - + concurrency: 4 linters: + default: none enable: - - revive - - govet - - unconvert - - staticcheck - - unused - - gosec - dupl - - misspell - - unparam - - typecheck - - ineffassign - - stylecheck - gochecknoinits - - copyloopvar - gocritic + - govet + - ineffassign + - misspell - nakedret - - gosimple - prealloc - fast: false - disable-all: true - -issues: - exclude-dirs: - - vendor - exclude-rules: - - text: "at least one file in a package should have a package comment" - linters: - - stylecheck - - text: "should have a package comment" - linters: - - revive - - path: _test\.go - linters: - - gosec - - dupl - exclude-use-default: false + - revive + - staticcheck + - unconvert + - unparam + - unused + settings: + goconst: + min-len: 2 + min-occurrences: 2 + gocritic: + disabled-checks: + - wrapperFunc + - hugeParam + - rangeValCopy + - singleCaseSwitch + - ifElseChain + enabled-tags: + - performance + - style + - experimental + govet: + enable-all: true + disable: + - fieldalignment + lll: + line-length: 140 + misspell: + locale: US + exclusions: + generated: lax + rules: + - linters: + - staticcheck + text: "at least one file in a package should have a package comment" + - linters: + - revive + text: "should have a package comment" + - linters: + - gosec + - dupl + path: _test\.go + paths: + - vendor + - third_party$ + - builtin$ + - examples$ diff --git a/backend/vendor/github.com/go-pkgz/rest/README.md b/backend/vendor/github.com/go-pkgz/rest/README.md index d72d478..1260cf8 100644 --- a/backend/vendor/github.com/go-pkgz/rest/README.md +++ b/backend/vendor/github.com/go-pkgz/rest/README.md @@ -157,7 +157,14 @@ Compresses response with gzip. ### RealIP middleware -RealIP is a middleware that sets a http.Request's RemoteAddr to the results of parsing either the X-Forwarded-For or X-Real-IP headers. +RealIP is a middleware that sets a http.Request's RemoteAddr to the results of parsing various headers that contain the client's real IP address. It checks headers in the following priority order: + +1. `X-Real-IP` - trusted proxy (nginx/reproxy) sets this to actual client +2. `CF-Connecting-IP` - Cloudflare's header for original client +3. `X-Forwarded-For` - leftmost public IP (original client in CDN/proxy chain) +4. `RemoteAddr` - fallback for direct connections + +Only public IPs are accepted from headers; private/loopback/link-local IPs are skipped. This makes the middleware compatible with CDN setups like Cloudflare where the leftmost IP in `X-Forwarded-For` is the actual client. ### Maybe middleware diff --git a/backend/vendor/github.com/go-pkgz/rest/blackwords.go b/backend/vendor/github.com/go-pkgz/rest/blackwords.go index 01c8502..8954db3 100644 --- a/backend/vendor/github.com/go-pkgz/rest/blackwords.go +++ b/backend/vendor/github.com/go-pkgz/rest/blackwords.go @@ -20,8 +20,7 @@ func BlackWords(words ...string) func(http.Handler) http.Handler { if body != "" { for _, word := range words { if strings.Contains(body, strings.ToLower(word)) { - w.WriteHeader(http.StatusForbidden) - RenderJSON(w, JSON{"error": "one of blacklisted words detected"}) + _ = EncodeJSON(w, http.StatusForbidden, JSON{"error": "one of blacklisted words detected"}) return } } diff --git a/backend/vendor/github.com/go-pkgz/rest/file_server.go b/backend/vendor/github.com/go-pkgz/rest/file_server.go index ccf47df..088ac9d 100644 --- a/backend/vendor/github.com/go-pkgz/rest/file_server.go +++ b/backend/vendor/github.com/go-pkgz/rest/file_server.go @@ -68,12 +68,14 @@ func NewFileServer(public, local string, options ...FsOpt) (*FS, error) { } // FileServer is a shortcut for making FS with listing disabled and the custom noFound reader (can be nil). +// // Deprecated: the method is for back-compatibility only and user should use the universal NewFileServer instead func FileServer(public, local string, notFound io.Reader) (http.Handler, error) { return NewFileServer(public, local, FsOptCustom404(notFound)) } // FileServerSPA is a shortcut for making FS with SPA-friendly handling of 404, listing disabled and the custom noFound reader (can be nil). +// // Deprecated: the method is for back-compatibility only and user should use the universal NewFileServer instead func FileServerSPA(public, local string, notFound io.Reader) (http.Handler, error) { return NewFileServer(public, local, FsOptCustom404(notFound), FsOptSPA) diff --git a/backend/vendor/github.com/go-pkgz/rest/logger/logger.go b/backend/vendor/github.com/go-pkgz/rest/logger/logger.go index e814663..d93342c 100644 --- a/backend/vendor/github.com/go-pkgz/rest/logger/logger.go +++ b/backend/vendor/github.com/go-pkgz/rest/logger/logger.go @@ -220,8 +220,8 @@ func (l *Middleware) getBody(r *http.Request) string { // "The Server will close the request body. The ServeHTTP Handler does not need to." // https://golang.org/pkg/net/http/#Request - // So we can use ioutil.NopCloser() to make io.ReadCloser. - // Note that below assignment is not approved by the docs: + // so we can use ioutil.NopCloser() to make io.ReadCloser. + // note that below assignment is not approved by the docs: // "Except for reading the body, handlers should not modify the provided Request." // https://golang.org/pkg/net/http/#Handler r.Body = io.NopCloser(reader) @@ -355,5 +355,5 @@ func (c *customResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) { if hj, ok := c.ResponseWriter.(http.Hijacker); ok { return hj.Hijack() } - return nil, nil, fmt.Errorf("ResponseWriter does not implement the Hijacker interface") //nolint:golint //capital letter is OK here + return nil, nil, fmt.Errorf("ResponseWriter does not implement the Hijacker interface") } diff --git a/backend/vendor/github.com/go-pkgz/rest/metrics.go b/backend/vendor/github.com/go-pkgz/rest/metrics.go index 1cf0a41..6edc2da 100644 --- a/backend/vendor/github.com/go-pkgz/rest/metrics.go +++ b/backend/vendor/github.com/go-pkgz/rest/metrics.go @@ -13,8 +13,7 @@ func Metrics(onlyIps ...string) func(http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { if r.Method == "GET" && strings.HasSuffix(strings.ToLower(r.URL.Path), "/metrics") { if matched, ip, err := matchSourceIP(r, onlyIps); !matched || err != nil { - w.WriteHeader(http.StatusForbidden) - RenderJSON(w, JSON{"error": fmt.Sprintf("ip %s rejected", ip)}) + _ = EncodeJSON(w, http.StatusForbidden, JSON{"error": fmt.Sprintf("ip %s rejected", ip)}) return } expvar.Handler().ServeHTTP(w, r) diff --git a/backend/vendor/github.com/go-pkgz/rest/middleware.go b/backend/vendor/github.com/go-pkgz/rest/middleware.go index 86b3cc1..c130a46 100644 --- a/backend/vendor/github.com/go-pkgz/rest/middleware.go +++ b/backend/vendor/github.com/go-pkgz/rest/middleware.go @@ -19,7 +19,6 @@ func Wrap(handler http.Handler, mws ...func(http.Handler) http.Handler) http.Han return handler } - // AppInfo adds custom app-info to the response header func AppInfo(app, author, version string) func(http.Handler) http.Handler { f := func(h http.Handler) http.Handler { @@ -82,12 +81,11 @@ func Health(path string, checkers ...func(ctx context.Context) (name string, err } resp = append(resp, hh) } + status := http.StatusOK if anyError { - w.WriteHeader(http.StatusServiceUnavailable) - } else { - w.WriteHeader(http.StatusOK) + status = http.StatusServiceUnavailable } - RenderJSON(w, resp) + _ = EncodeJSON(w, status, resp) } return http.HandlerFunc(fn) } @@ -147,13 +145,19 @@ func Maybe(mw func(http.Handler) http.Handler, maybeFn func(r *http.Request) boo } } -// RealIP is a middleware that sets a http.Request's RemoteAddr to the results -// of parsing either the X-Forwarded-For or X-Real-IP headers. +// RealIP is a middleware that sets a http.Request's RemoteAddr to the client's real IP. +// It checks headers in the following priority order: +// 1. X-Real-IP - trusted proxy (nginx/reproxy) sets this to actual client +// 2. CF-Connecting-IP - Cloudflare's header for original client +// 3. X-Forwarded-For - leftmost public IP (original client in CDN/proxy chain) +// 4. RemoteAddr - fallback for direct connections +// +// Only public IPs are accepted from headers; private/loopback/link-local IPs are skipped. // // This middleware should only be used if user can trust the headers sent with request. // If reverse proxies are configured to pass along arbitrary header values from the client, // or if this middleware used without a reverse proxy, malicious clients could set anything -// as X-Forwarded-For header and attack the server in various ways. +// as these headers and spoof their IP address. func RealIP(h http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { if rip, err := realip.Get(r); err == nil { diff --git a/backend/vendor/github.com/go-pkgz/rest/nocache.go b/backend/vendor/github.com/go-pkgz/rest/nocache.go index aa0fa94..9808a0e 100644 --- a/backend/vendor/github.com/go-pkgz/rest/nocache.go +++ b/backend/vendor/github.com/go-pkgz/rest/nocache.go @@ -29,21 +29,22 @@ var etagHeaders = []string{ // a router (or subrouter) from being cached by an upstream proxy and/or client. // // As per http://wiki.nginx.org/HttpProxyModule - NoCache sets: -// Expires: Thu, 01 Jan 1970 00:00:00 UTC -// Cache-Control: no-cache, private, max-age=0 -// X-Accel-Expires: 0 -// Pragma: no-cache (for HTTP/1.0 proxies/clients) +// +// Expires: Thu, 01 Jan 1970 00:00:00 UTC +// Cache-Control: no-cache, private, max-age=0 +// X-Accel-Expires: 0 +// Pragma: no-cache (for HTTP/1.0 proxies/clients) func NoCache(h http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { - // Delete any ETag headers that may have been set + // delete any ETag headers that may have been set for _, v := range etagHeaders { if r.Header.Get(v) != "" { r.Header.Del(v) } } - // Set our NoCache headers + // set our NoCache headers for k, v := range noCacheHeaders { w.Header().Set(k, v) } diff --git a/backend/vendor/github.com/go-pkgz/rest/onlyfrom.go b/backend/vendor/github.com/go-pkgz/rest/onlyfrom.go index cccd77e..acc8ff2 100644 --- a/backend/vendor/github.com/go-pkgz/rest/onlyfrom.go +++ b/backend/vendor/github.com/go-pkgz/rest/onlyfrom.go @@ -21,8 +21,7 @@ func OnlyFrom(onlyIps ...string) func(http.Handler) http.Handler { } matched, ip, err := matchSourceIP(r, onlyIps) if err != nil { - w.WriteHeader(http.StatusInternalServerError) - RenderJSON(w, JSON{"error": fmt.Sprintf("can't get realip: %s", err)}) + _ = EncodeJSON(w, http.StatusInternalServerError, JSON{"error": fmt.Sprintf("can't get realip: %s", err)}) return } if matched { @@ -31,8 +30,7 @@ func OnlyFrom(onlyIps ...string) func(http.Handler) http.Handler { return } - w.WriteHeader(http.StatusForbidden) - RenderJSON(w, JSON{"error": fmt.Sprintf("ip %q rejected", ip)}) + _ = EncodeJSON(w, http.StatusForbidden, JSON{"error": fmt.Sprintf("ip %q rejected", ip)}) } return http.HandlerFunc(fn) } diff --git a/backend/vendor/github.com/go-pkgz/rest/realip/real.go b/backend/vendor/github.com/go-pkgz/rest/realip/real.go index eb7a952..ad10149 100644 --- a/backend/vendor/github.com/go-pkgz/rest/realip/real.go +++ b/backend/vendor/github.com/go-pkgz/rest/realip/real.go @@ -33,49 +33,73 @@ var privateRanges = []ipRange{ {start: net.ParseIP("fe80::"), end: net.ParseIP("febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff")}, } -// Get returns real ip from the given request -// Prioritize public IPs over private IPs +// Get returns real IP from the given request. +// It checks headers in the following priority order: +// 1. X-Real-IP - trusted proxy (nginx/reproxy) sets this to actual client +// 2. CF-Connecting-IP - Cloudflare's header for original client +// 3. X-Forwarded-For - leftmost public IP (original client in CDN chain) +// 4. RemoteAddr - fallback for direct connections +// +// Only public IPs are accepted from headers; private/loopback/link-local IPs are skipped. func Get(r *http.Request) (string, error) { - var firstIP string - for _, h := range []string{"X-Forwarded-For", "X-Real-Ip"} { - addresses := strings.Split(r.Header.Get(h), ",") - for i := len(addresses) - 1; i >= 0; i-- { - ip := strings.TrimSpace(addresses[i]) - realIP := net.ParseIP(ip) - if firstIP == "" && realIP != nil { - firstIP = ip - } - // Guard against nil realIP - if realIP == nil || !realIP.IsGlobalUnicast() || isPrivateSubnet(realIP) { - continue + // check X-Real-IP first (single value, set by trusted proxy) + if xRealIP := strings.TrimSpace(r.Header.Get("X-Real-IP")); xRealIP != "" { + if ip := net.ParseIP(xRealIP); isPublicIP(ip) { + return xRealIP, nil + } + } + + // check CF-Connecting-IP (Cloudflare's header) + if cfIP := strings.TrimSpace(r.Header.Get("CF-Connecting-IP")); cfIP != "" { + if ip := net.ParseIP(cfIP); isPublicIP(ip) { + return cfIP, nil + } + } + + // check X-Forwarded-For, find leftmost public IP + if xff := r.Header.Get("X-Forwarded-For"); xff != "" { + addresses := strings.Split(xff, ",") + for _, addr := range addresses { + ip := strings.TrimSpace(addr) + if parsedIP := net.ParseIP(ip); isPublicIP(parsedIP) { + return ip, nil } - return ip, nil } } - if firstIP != "" { - return firstIP, nil + // fall back to RemoteAddr + return parseRemoteAddr(r.RemoteAddr) +} + +// isPublicIP checks if the IP is a valid public (globally routable) IP address. +func isPublicIP(ip net.IP) bool { + if ip == nil { + return false + } + if !ip.IsGlobalUnicast() { + return false } + return !isPrivateSubnet(ip) +} - // handle RemoteAddr which may be just an IP or IP:port - remoteIP := r.RemoteAddr +// parseRemoteAddr extracts and validates IP from RemoteAddr (handles both "ip" and "ip:port" formats). +func parseRemoteAddr(remoteAddr string) (string, error) { + if remoteAddr == "" { + return "", fmt.Errorf("empty remote address") + } // try to extract host from host:port format - host, _, err := net.SplitHostPort(remoteIP) + host, _, err := net.SplitHostPort(remoteAddr) if err == nil { - remoteIP = host + remoteAddr = host } - // at this point remoteIP could be either: - // 1. the host part extracted from host:port - // 2. yhe original RemoteAddr if it doesn't contain a port - - // try to parse it as a valid IP address - if netIP := net.ParseIP(remoteIP); netIP == nil { - return "", fmt.Errorf("no valid ip found in %q", r.RemoteAddr) + // validate it's a proper IP address + if netIP := net.ParseIP(remoteAddr); netIP == nil { + return "", fmt.Errorf("no valid ip found in %q", remoteAddr) } - return remoteIP, nil + return remoteAddr, nil } // isPrivateSubnet - check to see if this ip is in a private subnet diff --git a/backend/vendor/golang.org/x/sync/errgroup/errgroup.go b/backend/vendor/golang.org/x/sync/errgroup/errgroup.go index 2f45dbc..f69fd75 100644 --- a/backend/vendor/golang.org/x/sync/errgroup/errgroup.go +++ b/backend/vendor/golang.org/x/sync/errgroup/errgroup.go @@ -144,8 +144,8 @@ func (g *Group) SetLimit(n int) { g.sem = nil return } - if len(g.sem) != 0 { - panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", len(g.sem))) + if active := len(g.sem); active != 0 { + panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", active)) } g.sem = make(chan token, n) } diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu.go b/backend/vendor/golang.org/x/sys/cpu/cpu.go index 34c9ae7..6354199 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu.go +++ b/backend/vendor/golang.org/x/sys/cpu/cpu.go @@ -92,9 +92,6 @@ var ARM64 struct { HasSHA2 bool // SHA2 hardware implementation HasCRC32 bool // CRC32 hardware implementation HasATOMICS bool // Atomic memory operation instruction set - HasHPDS bool // Hierarchical permission disables in translations tables - HasLOR bool // Limited ordering regions - HasPAN bool // Privileged access never HasFPHP bool // Half precision floating-point instruction set HasASIMDHP bool // Advanced SIMD half precision instruction set HasCPUID bool // CPUID identification scheme registers diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.go index f449c67..af2aa99 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ b/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -65,10 +65,10 @@ func setMinimalFeatures() { func readARM64Registers() { Initialized = true - parseARM64SystemRegisters(getisar0(), getisar1(), getmmfr1(), getpfr0()) + parseARM64SystemRegisters(getisar0(), getisar1(), getpfr0()) } -func parseARM64SystemRegisters(isar0, isar1, mmfr1, pfr0 uint64) { +func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { // ID_AA64ISAR0_EL1 switch extractBits(isar0, 4, 7) { case 1: @@ -152,22 +152,6 @@ func parseARM64SystemRegisters(isar0, isar1, mmfr1, pfr0 uint64) { ARM64.HasI8MM = true } - // ID_AA64MMFR1_EL1 - switch extractBits(mmfr1, 12, 15) { - case 1, 2: - ARM64.HasHPDS = true - } - - switch extractBits(mmfr1, 16, 19) { - case 1: - ARM64.HasLOR = true - } - - switch extractBits(mmfr1, 20, 23) { - case 1, 2, 3: - ARM64.HasPAN = true - } - // ID_AA64PFR0_EL1 switch extractBits(pfr0, 16, 19) { case 0: diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.s b/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.s index a4f24b3..3b0450a 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.s +++ b/backend/vendor/golang.org/x/sys/cpu/cpu_arm64.s @@ -20,13 +20,6 @@ TEXT ·getisar1(SB),NOSPLIT,$0-8 MOVD R0, ret+0(FP) RET -// func getmmfr1() uint64 -TEXT ·getmmfr1(SB),NOSPLIT,$0-8 - // get Memory Model Feature Register 1 into x0 - MRS ID_AA64MMFR1_EL1, R0 - MOVD R0, ret+0(FP) - RET - // func getpfr0() uint64 TEXT ·getpfr0(SB),NOSPLIT,$0-8 // get Processor Feature Register 0 into x0 diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go b/backend/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go index e3fc5a8..6ac6e1e 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go +++ b/backend/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go @@ -8,6 +8,5 @@ package cpu func getisar0() uint64 func getisar1() uint64 -func getmmfr1() uint64 func getpfr0() uint64 func getzfr0() uint64 diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go b/backend/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go index 8df2079..7f19467 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +++ b/backend/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go @@ -8,5 +8,4 @@ package cpu func getisar0() uint64 { return 0 } func getisar1() uint64 { return 0 } -func getmmfr1() uint64 { return 0 } func getpfr0() uint64 { return 0 } diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go b/backend/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go index 19aea06..ebfb3fc 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go +++ b/backend/vendor/golang.org/x/sys/cpu/cpu_netbsd_arm64.go @@ -167,7 +167,7 @@ func doinit() { setMinimalFeatures() return } - parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64mmfr1, cpuid.aa64pfr0) + parseARM64SystemRegisters(cpuid.aa64isar0, cpuid.aa64isar1, cpuid.aa64pfr0) Initialized = true } diff --git a/backend/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go b/backend/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go index 87fd3a7..85b64d5 100644 --- a/backend/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go +++ b/backend/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go @@ -59,7 +59,7 @@ func doinit() { if !ok { return } - parseARM64SystemRegisters(isar0, isar1, 0, 0) + parseARM64SystemRegisters(isar0, isar1, 0) Initialized = true } diff --git a/backend/vendor/golang.org/x/sys/unix/mkerrors.sh b/backend/vendor/golang.org/x/sys/unix/mkerrors.sh index 4251707..fd39be4 100644 --- a/backend/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/backend/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -256,6 +256,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -613,7 +614,7 @@ ccflags="$@" $2 !~ /IOC_MAGIC/ && $2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ || $2 ~ /^(VM|VMADDR)_/ || - $2 ~ /^IOCTL_VM_SOCKETS_/ || + $2 ~ /^(IOCTL_VM_SOCKETS_|IOCTL_MEI_)/ || $2 ~ /^(TASKSTATS|TS)_/ || $2 ~ /^CGROUPSTATS_/ || $2 ~ /^GENL_/ || diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux.go index d0a75da..120a7b3 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -1615,6 +1615,8 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_MEI_CONNECT_CLIENT = 0xc0104801 + IOCTL_MEI_CONNECT_CLIENT_VTAG = 0xc0144804 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 1c37f9f..97a61fc 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -116,6 +116,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 6f54d34..a0d6d49 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -116,6 +116,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 783ec5c..dd9c903 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index ca83d3b..384c61c 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -120,6 +120,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 607e611..6384c98 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -116,6 +116,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index b9cb5bd..553c1c6 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 65b078a..b3339f2 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 5298a30..177091d 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 7bc557c..c5abf15 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 152399b..f1f3fad 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 1a1ce24..203ad9c 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 4231a1f..4b9abcb 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 21c0e95..f879830 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index f00d1cd..64347eb 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -115,6 +115,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 + IOCTL_MEI_NOTIFY_GET = 0x80044803 + IOCTL_MEI_NOTIFY_SET = 0x40044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index bc8d539..7d71911 100644 --- a/backend/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/backend/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -119,6 +119,8 @@ const ( IEXTEN = 0x8000 IN_CLOEXEC = 0x400000 IN_NONBLOCK = 0x4000 + IOCTL_MEI_NOTIFY_GET = 0x40044803 + IOCTL_MEI_NOTIFY_SET = 0x80044802 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPV6_FLOWINFO_MASK = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff diff --git a/backend/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/backend/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index 439548e..50e8e64 100644 --- a/backend/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/backend/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -104,7 +104,7 @@ type Statvfs_t struct { Fsid uint32 Namemax uint32 Owner uint32 - Spare [4]uint32 + Spare [4]uint64 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]byte diff --git a/backend/vendor/golang.org/x/text/encoding/japanese/eucjp.go b/backend/vendor/golang.org/x/text/encoding/japanese/eucjp.go index 79313fa..6fce8c5 100644 --- a/backend/vendor/golang.org/x/text/encoding/japanese/eucjp.go +++ b/backend/vendor/golang.org/x/text/encoding/japanese/eucjp.go @@ -17,9 +17,9 @@ import ( var EUCJP encoding.Encoding = &eucJP var eucJP = internal.Encoding{ - &internal.SimpleEncoding{eucJPDecoder{}, eucJPEncoder{}}, - "EUC-JP", - identifier.EUCPkdFmtJapanese, + Encoding: &internal.SimpleEncoding{Decoder: eucJPDecoder{}, Encoder: eucJPEncoder{}}, + Name: "EUC-JP", + MIB: identifier.EUCPkdFmtJapanese, } type eucJPDecoder struct{ transform.NopResetter } diff --git a/backend/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go b/backend/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go index 613226d..6f7bd46 100644 --- a/backend/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go +++ b/backend/vendor/golang.org/x/text/encoding/japanese/iso2022jp.go @@ -17,9 +17,9 @@ import ( var ISO2022JP encoding.Encoding = &iso2022JP var iso2022JP = internal.Encoding{ - internal.FuncEncoding{iso2022JPNewDecoder, iso2022JPNewEncoder}, - "ISO-2022-JP", - identifier.ISO2022JP, + Encoding: internal.FuncEncoding{Decoder: iso2022JPNewDecoder, Encoder: iso2022JPNewEncoder}, + Name: "ISO-2022-JP", + MIB: identifier.ISO2022JP, } func iso2022JPNewDecoder() transform.Transformer { diff --git a/backend/vendor/golang.org/x/text/encoding/japanese/shiftjis.go b/backend/vendor/golang.org/x/text/encoding/japanese/shiftjis.go index 16fd8a6..af65d43 100644 --- a/backend/vendor/golang.org/x/text/encoding/japanese/shiftjis.go +++ b/backend/vendor/golang.org/x/text/encoding/japanese/shiftjis.go @@ -18,9 +18,9 @@ import ( var ShiftJIS encoding.Encoding = &shiftJIS var shiftJIS = internal.Encoding{ - &internal.SimpleEncoding{shiftJISDecoder{}, shiftJISEncoder{}}, - "Shift JIS", - identifier.ShiftJIS, + Encoding: &internal.SimpleEncoding{Decoder: shiftJISDecoder{}, Encoder: shiftJISEncoder{}}, + Name: "Shift JIS", + MIB: identifier.ShiftJIS, } type shiftJISDecoder struct{ transform.NopResetter } diff --git a/backend/vendor/golang.org/x/text/encoding/korean/euckr.go b/backend/vendor/golang.org/x/text/encoding/korean/euckr.go index 034337f..81c8347 100644 --- a/backend/vendor/golang.org/x/text/encoding/korean/euckr.go +++ b/backend/vendor/golang.org/x/text/encoding/korean/euckr.go @@ -20,9 +20,9 @@ var All = []encoding.Encoding{EUCKR} var EUCKR encoding.Encoding = &eucKR var eucKR = internal.Encoding{ - &internal.SimpleEncoding{eucKRDecoder{}, eucKREncoder{}}, - "EUC-KR", - identifier.EUCKR, + Encoding: &internal.SimpleEncoding{Decoder: eucKRDecoder{}, Encoder: eucKREncoder{}}, + Name: "EUC-KR", + MIB: identifier.EUCKR, } type eucKRDecoder struct{ transform.NopResetter } diff --git a/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go b/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go index 0e0fabf..2f2fd5d 100644 --- a/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go +++ b/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go @@ -22,21 +22,21 @@ var ( ) var gbk = internal.Encoding{ - &internal.SimpleEncoding{ - gbkDecoder{gb18030: false}, - gbkEncoder{gb18030: false}, + Encoding: &internal.SimpleEncoding{ + Decoder: gbkDecoder{gb18030: false}, + Encoder: gbkEncoder{gb18030: false}, }, - "GBK", - identifier.GBK, + Name: "GBK", + MIB: identifier.GBK, } var gbk18030 = internal.Encoding{ - &internal.SimpleEncoding{ - gbkDecoder{gb18030: true}, - gbkEncoder{gb18030: true}, + Encoding: &internal.SimpleEncoding{ + Decoder: gbkDecoder{gb18030: true}, + Encoder: gbkEncoder{gb18030: true}, }, - "GB18030", - identifier.GB18030, + Name: "GB18030", + MIB: identifier.GB18030, } type gbkDecoder struct { diff --git a/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go b/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go index e15b7bf..351750e 100644 --- a/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go +++ b/backend/vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go @@ -17,9 +17,9 @@ import ( var HZGB2312 encoding.Encoding = &hzGB2312 var hzGB2312 = internal.Encoding{ - internal.FuncEncoding{hzGB2312NewDecoder, hzGB2312NewEncoder}, - "HZ-GB2312", - identifier.HZGB2312, + Encoding: internal.FuncEncoding{Decoder: hzGB2312NewDecoder, Encoder: hzGB2312NewEncoder}, + Name: "HZ-GB2312", + MIB: identifier.HZGB2312, } func hzGB2312NewDecoder() transform.Transformer { diff --git a/backend/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go b/backend/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go index 1fcddde..5046920 100644 --- a/backend/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go +++ b/backend/vendor/golang.org/x/text/encoding/traditionalchinese/big5.go @@ -20,9 +20,9 @@ var All = []encoding.Encoding{Big5} var Big5 encoding.Encoding = &big5 var big5 = internal.Encoding{ - &internal.SimpleEncoding{big5Decoder{}, big5Encoder{}}, - "Big5", - identifier.Big5, + Encoding: &internal.SimpleEncoding{Decoder: big5Decoder{}, Encoder: big5Encoder{}}, + Name: "Big5", + MIB: identifier.Big5, } type big5Decoder struct{ transform.NopResetter } diff --git a/backend/vendor/golang.org/x/text/encoding/unicode/unicode.go b/backend/vendor/golang.org/x/text/encoding/unicode/unicode.go index dd99ad1..ce28c90 100644 --- a/backend/vendor/golang.org/x/text/encoding/unicode/unicode.go +++ b/backend/vendor/golang.org/x/text/encoding/unicode/unicode.go @@ -60,9 +60,9 @@ func (utf8bomEncoding) NewDecoder() *encoding.Decoder { } var utf8enc = &internal.Encoding{ - &internal.SimpleEncoding{utf8Decoder{}, runes.ReplaceIllFormed()}, - "UTF-8", - identifier.UTF8, + Encoding: &internal.SimpleEncoding{Decoder: utf8Decoder{}, Encoder: runes.ReplaceIllFormed()}, + Name: "UTF-8", + MIB: identifier.UTF8, } type utf8bomDecoder struct { diff --git a/backend/vendor/modules.txt b/backend/vendor/modules.txt index 0b8aed2..7cae10e 100644 --- a/backend/vendor/modules.txt +++ b/backend/vendor/modules.txt @@ -10,8 +10,8 @@ github.com/davecgh/go-spew/spew # github.com/go-pkgz/lgr v0.12.1 ## explicit; go 1.21 github.com/go-pkgz/lgr -# github.com/go-pkgz/rest v1.20.4 -## explicit; go 1.23.0 +# github.com/go-pkgz/rest v1.20.6 +## explicit; go 1.24.0 github.com/go-pkgz/rest github.com/go-pkgz/rest/logger github.com/go-pkgz/rest/realip @@ -112,7 +112,7 @@ go.mongodb.org/mongo-driver/x/mongo/driver/operation go.mongodb.org/mongo-driver/x/mongo/driver/session go.mongodb.org/mongo-driver/x/mongo/driver/topology go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage -# golang.org/x/crypto v0.45.0 +# golang.org/x/crypto v0.46.0 ## explicit; go 1.24.0 golang.org/x/crypto/argon2 golang.org/x/crypto/bcrypt @@ -121,20 +121,20 @@ golang.org/x/crypto/blowfish golang.org/x/crypto/ocsp golang.org/x/crypto/pbkdf2 golang.org/x/crypto/scrypt -# golang.org/x/net v0.47.0 +# golang.org/x/net v0.48.0 ## explicit; go 1.24.0 golang.org/x/net/html golang.org/x/net/html/atom golang.org/x/net/html/charset -# golang.org/x/sync v0.18.0 +# golang.org/x/sync v0.19.0 ## explicit; go 1.24.0 golang.org/x/sync/errgroup golang.org/x/sync/singleflight -# golang.org/x/sys v0.38.0 +# golang.org/x/sys v0.39.0 ## explicit; go 1.24.0 golang.org/x/sys/cpu golang.org/x/sys/unix -# golang.org/x/text v0.31.0 +# golang.org/x/text v0.32.0 ## explicit; go 1.24.0 golang.org/x/text/encoding golang.org/x/text/encoding/charmap