Fix x/image CVEs with Go 1.25
- commit
- ddd2917de44db548761835f267705ee5df4fe1fc
- author
- patriceckhart · · 2026-07-06 05:51 UTC
- parent
- cc21943
- signature
- unsigned
5 files · +9 -8
M go.mod +1 -1
| @@ -7,7 +7,7 @@ require ( | |||
| 7 | 7 | github.com/google/uuid v1.6.0 | |
| 8 | 8 | github.com/mattn/go-runewidth v0.0.16 | |
| 9 | 9 | github.com/sahilm/fuzzy v0.1.1 | |
| 10 | - | golang.org/x/image v0.39.0 | |
| 10 | + | golang.org/x/image v0.43.0 | |
| 11 | 11 | golang.org/x/sys v0.26.0 | |
| 12 | 12 | golang.org/x/term v0.25.0 | |
| 13 | 13 | ) | |
| @@ -7,7 +7,7 @@ require ( | |||||
| 7 | github.com/google/uuid v1.6.0 | 7 | github.com/google/uuid v1.6.0 | ||
| 8 | github.com/mattn/go-runewidth v0.0.16 | 8 | github.com/mattn/go-runewidth v0.0.16 | ||
| 9 | github.com/sahilm/fuzzy v0.1.1 | 9 | github.com/sahilm/fuzzy v0.1.1 | ||
| 10 | - | golang.org/x/image v0.39.0 | 10 | + | golang.org/x/image v0.43.0 |
| 11 | golang.org/x/sys v0.26.0 | 11 | golang.org/x/sys v0.26.0 | ||
| 12 | golang.org/x/term v0.25.0 | 12 | golang.org/x/term v0.25.0 | ||
| 13 | ) | 13 | ) | ||
M go.sum +2 -4 generated file: collapsed
M packages/provider/auth/callback.go +2 -1
| @@ -2,6 +2,7 @@ package auth | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "context" | |
| 5 | + | "errors" | |
| 5 | 6 | "fmt" | |
| 6 | 7 | "net" | |
| 7 | 8 | "net/http" | |
| @@ -91,7 +92,7 @@ func (cs *CallbackServer) handle(w http.ResponseWriter, r *http.Request) { | |||
| 91 | 92 | } | |
| 92 | 93 | w.WriteHeader(http.StatusBadRequest) | |
| 93 | 94 | _, _ = w.Write([]byte(oauthErrorHTML(msg))) | |
| 94 | - | cs.deliver(CallbackResult{Err: fmt.Errorf(msg), RawPath: r.URL.RequestURI()}) | |
| 95 | + | cs.deliver(CallbackResult{Err: errors.New(msg), RawPath: r.URL.RequestURI()}) | |
| 95 | 96 | return | |
| 96 | 97 | } | |
| 97 | 98 | code := q.Get("code") | |
| @@ -2,6 +2,7 @@ package auth | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "context" | 4 | "context" | ||
| 5 | + | "errors" | |||
| 5 | "fmt" | 6 | "fmt" | ||
| 6 | "net" | 7 | "net" | ||
| 7 | "net/http" | 8 | "net/http" | ||
| @@ -91,7 +92,7 @@ func (cs *CallbackServer) handle(w http.ResponseWriter, r *http.Request) { | |||||
| 91 | } | 92 | } | ||
| 92 | w.WriteHeader(http.StatusBadRequest) | 93 | w.WriteHeader(http.StatusBadRequest) | ||
| 93 | _, _ = w.Write([]byte(oauthErrorHTML(msg))) | 94 | _, _ = w.Write([]byte(oauthErrorHTML(msg))) | ||
| 94 | - | cs.deliver(CallbackResult{Err: fmt.Errorf(msg), RawPath: r.URL.RequestURI()}) | 95 | + | cs.deliver(CallbackResult{Err: errors.New(msg), RawPath: r.URL.RequestURI()}) |
| 95 | return | 96 | return | ||
| 96 | } | 97 | } | ||
| 97 | code := q.Get("code") | 98 | code := q.Get("code") | ||
M packages/provider/auth/manager.go +2 -1
| @@ -2,6 +2,7 @@ package auth | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "context" | |
| 5 | + | "errors" | |
| 5 | 6 | "fmt" | |
| 6 | 7 | "net/url" | |
| 7 | 8 | "os" | |
| @@ -81,7 +82,7 @@ func (m *Manager) Close() { | |||
| 81 | 82 | // StartAPIKey launches the API-key login flow. | |
| 82 | 83 | func (m *Manager) StartAPIKey(provider string) (string, error) { | |
| 83 | 84 | if !isKnownAPIKeyProvider(provider) { | |
| 84 | - | return "", fmt.Errorf(apiKeyProviderMessage()) | |
| 85 | + | return "", errors.New(apiKeyProviderMessage()) | |
| 85 | 86 | } | |
| 86 | 87 | if err := m.ensureKeyServer(); err != nil { | |
| 87 | 88 | return "", err | |
| @@ -2,6 +2,7 @@ package auth | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "context" | 4 | "context" | ||
| 5 | + | "errors" | |||
| 5 | "fmt" | 6 | "fmt" | ||
| 6 | "net/url" | 7 | "net/url" | ||
| 7 | "os" | 8 | "os" | ||
| @@ -81,7 +82,7 @@ func (m *Manager) Close() { | |||||
| 81 | // StartAPIKey launches the API-key login flow. | 82 | // StartAPIKey launches the API-key login flow. | ||
| 82 | func (m *Manager) StartAPIKey(provider string) (string, error) { | 83 | func (m *Manager) StartAPIKey(provider string) (string, error) { | ||
| 83 | if !isKnownAPIKeyProvider(provider) { | 84 | if !isKnownAPIKeyProvider(provider) { | ||
| 84 | - | return "", fmt.Errorf(apiKeyProviderMessage()) | 85 | + | return "", errors.New(apiKeyProviderMessage()) |
| 85 | } | 86 | } | ||
| 86 | if err := m.ensureKeyServer(); err != nil { | 87 | if err := m.ensureKeyServer(); err != nil { | ||
| 87 | return "", err | 88 | return "", err | ||
M packages/provider/auth/server.go +2 -1
| @@ -2,6 +2,7 @@ package auth | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "context" | |
| 5 | + | "errors" | |
| 5 | 6 | "fmt" | |
| 6 | 7 | "html/template" | |
| 7 | 8 | "net" | |
| @@ -204,7 +205,7 @@ func (s *Server) handleCallback(w http.ResponseWriter, r *http.Request) { | |||
| 204 | 205 | msg += ": " + d | |
| 205 | 206 | } | |
| 206 | 207 | s.errorPage(w, msg) | |
| 207 | - | s.results <- LoginResult{Provider: provider, Method: "oauth", Err: fmt.Errorf(msg)} | |
| 208 | + | s.results <- LoginResult{Provider: provider, Method: "oauth", Err: errors.New(msg)} | |
| 208 | 209 | return | |
| 209 | 210 | } | |
| 210 | 211 | code := q.Get("code") | |
| @@ -2,6 +2,7 @@ package auth | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "context" | 4 | "context" | ||
| 5 | + | "errors" | |||
| 5 | "fmt" | 6 | "fmt" | ||
| 6 | "html/template" | 7 | "html/template" | ||
| 7 | "net" | 8 | "net" | ||
| @@ -204,7 +205,7 @@ func (s *Server) handleCallback(w http.ResponseWriter, r *http.Request) { | |||||
| 204 | msg += ": " + d | 205 | msg += ": " + d | ||
| 205 | } | 206 | } | ||
| 206 | s.errorPage(w, msg) | 207 | s.errorPage(w, msg) | ||
| 207 | - | s.results <- LoginResult{Provider: provider, Method: "oauth", Err: fmt.Errorf(msg)} | 208 | + | s.results <- LoginResult{Provider: provider, Method: "oauth", Err: errors.New(msg)} |
| 208 | return | 209 | return | ||
| 209 | } | 210 | } | ||
| 210 | code := q.Get("code") | 211 | code := q.Get("code") | ||