mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 05:52:25 -05:00 
			
		
		
		
	[chore] update dependencies (#4188)
Update dependencies:
- github.com/gin-gonic/gin v1.10.0 -> v1.10.1
- github.com/gin-contrib/sessions v1.10.3 -> v1.10.4
- github.com/jackc/pgx/v5 v5.7.4 -> v5.7.5
- github.com/minio/minio-go/v7 v7.0.91 -> v7.0.92
- github.com/pquerna/otp v1.4.0 -> v1.5.0
- github.com/tdewolff/minify/v2 v2.23.5 -> v2.23.8
- github.com/yuin/goldmark v1.7.11 -> v1.7.12
- go.opentelemetry.io/otel{,/*} v1.35.0 -> v1.36.0
- modernc.org/sqlite v1.37.0 -> v1.37.1
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4188
Reviewed-by: Daenney <daenney@noreply.codeberg.org>
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
	
	
This commit is contained in:
		
					parent
					
						
							
								20aad9be0f
							
						
					
				
			
			
				commit
				
					
						b6ff55662e
					
				
			
		
					 214 changed files with 44839 additions and 32023 deletions
				
			
		
							
								
								
									
										10
									
								
								vendor/github.com/jackc/pgx/v5/CHANGELOG.md
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/jackc/pgx/v5/CHANGELOG.md
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -1,3 +1,13 @@ | |||
| # 5.7.5 (May 17, 2025) | ||||
| 
 | ||||
| * Support sslnegotiation connection option (divyam234) | ||||
| * Update golang.org/x/crypto to v0.37.0. This placates security scanners that were unable to see that pgx did not use the behavior affected by https://pkg.go.dev/vuln/GO-2025-3487. | ||||
| * TraceLog now logs Acquire and Release at the debug level (dave sinclair) | ||||
| * Add support for PGTZ environment variable | ||||
| * Add support for PGOPTIONS environment variable | ||||
| * Unpin memory used by Rows quicker | ||||
| * Remove PlanScan memoization. This resolves a rare issue where scanning could be broken for one type by first scanning another. The problem was in the memoization system and benchmarking revealed that memoization was not providing any meaningful benefit. | ||||
| 
 | ||||
| # 5.7.4 (March 24, 2025) | ||||
| 
 | ||||
| * Fix / revert change to scanning JSON `null` (Felix Röhrich) | ||||
|  |  | |||
							
								
								
									
										2
									
								
								vendor/github.com/jackc/pgx/v5/README.md
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/jackc/pgx/v5/README.md
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -92,7 +92,7 @@ See the presentation at Golang Estonia, [PGX Top to Bottom](https://www.youtube. | |||
| 
 | ||||
| ## Supported Go and PostgreSQL Versions | ||||
| 
 | ||||
| pgx supports the same versions of Go and PostgreSQL that are supported by their respective teams. For [Go](https://golang.org/doc/devel/release.html#policy) that is the two most recent major releases and for [PostgreSQL](https://www.postgresql.org/support/versioning/) the major releases in the last 5 years. This means pgx supports Go 1.22 and higher and PostgreSQL 13 and higher. pgx also is tested against the latest version of [CockroachDB](https://www.cockroachlabs.com/product/). | ||||
| pgx supports the same versions of Go and PostgreSQL that are supported by their respective teams. For [Go](https://golang.org/doc/devel/release.html#policy) that is the two most recent major releases and for [PostgreSQL](https://www.postgresql.org/support/versioning/) the major releases in the last 5 years. This means pgx supports Go 1.23 and higher and PostgreSQL 13 and higher. pgx also is tested against the latest version of [CockroachDB](https://www.cockroachlabs.com/product/). | ||||
| 
 | ||||
| ## Version Policy | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										2
									
								
								vendor/github.com/jackc/pgx/v5/doc.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/jackc/pgx/v5/doc.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -183,7 +183,7 @@ For debug tracing of the actual PostgreSQL wire protocol messages see github.com | |||
| 
 | ||||
| Lower Level PostgreSQL Functionality | ||||
| 
 | ||||
| github.com/jackc/pgx/v5/pgconn contains a lower level PostgreSQL driver roughly at the level of libpq. pgx.Conn in | ||||
| github.com/jackc/pgx/v5/pgconn contains a lower level PostgreSQL driver roughly at the level of libpq. pgx.Conn is | ||||
| implemented on top of pgconn. The Conn.PgConn() method can be used to access this lower layer. | ||||
| 
 | ||||
| PgBouncer | ||||
|  |  | |||
							
								
								
									
										17
									
								
								vendor/github.com/jackc/pgx/v5/pgconn/config.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								vendor/github.com/jackc/pgx/v5/pgconn/config.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -51,6 +51,8 @@ type Config struct { | |||
| 	KerberosSpn     string | ||||
| 	Fallbacks       []*FallbackConfig | ||||
| 
 | ||||
| 	SSLNegotiation string // sslnegotiation=postgres or sslnegotiation=direct | ||||
| 
 | ||||
| 	// ValidateConnect is called during a connection attempt after a successful authentication with the PostgreSQL server. | ||||
| 	// It can be used to validate that the server is acceptable. If this returns an error the connection is closed and the next | ||||
| 	// fallback config is tried. This allows implementing high availability behavior such as libpq does with target_session_attrs. | ||||
|  | @ -198,9 +200,11 @@ func NetworkAddress(host string, port uint16) (network, address string) { | |||
| //	PGSSLKEY | ||||
| //	PGSSLROOTCERT | ||||
| //	PGSSLPASSWORD | ||||
| //	PGOPTIONS | ||||
| //	PGAPPNAME | ||||
| //	PGCONNECT_TIMEOUT | ||||
| //	PGTARGETSESSIONATTRS | ||||
| //	PGTZ | ||||
| // | ||||
| // See http://www.postgresql.org/docs/11/static/libpq-envars.html for details on the meaning of environment variables. | ||||
| // | ||||
|  | @ -318,6 +322,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con | |||
| 		"sslkey":               {}, | ||||
| 		"sslcert":              {}, | ||||
| 		"sslrootcert":          {}, | ||||
| 		"sslnegotiation":       {}, | ||||
| 		"sslpassword":          {}, | ||||
| 		"sslsni":               {}, | ||||
| 		"krbspn":               {}, | ||||
|  | @ -386,6 +391,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con | |||
| 	config.Port = fallbacks[0].Port | ||||
| 	config.TLSConfig = fallbacks[0].TLSConfig | ||||
| 	config.Fallbacks = fallbacks[1:] | ||||
| 	config.SSLNegotiation = settings["sslnegotiation"] | ||||
| 
 | ||||
| 	passfile, err := pgpassfile.ReadPassfile(settings["passfile"]) | ||||
| 	if err == nil { | ||||
|  | @ -449,9 +455,12 @@ func parseEnvSettings() map[string]string { | |||
| 		"PGSSLSNI":             "sslsni", | ||||
| 		"PGSSLROOTCERT":        "sslrootcert", | ||||
| 		"PGSSLPASSWORD":        "sslpassword", | ||||
| 		"PGSSLNEGOTIATION":     "sslnegotiation", | ||||
| 		"PGTARGETSESSIONATTRS": "target_session_attrs", | ||||
| 		"PGSERVICE":            "service", | ||||
| 		"PGSERVICEFILE":        "servicefile", | ||||
| 		"PGTZ":                 "timezone", | ||||
| 		"PGOPTIONS":            "options", | ||||
| 	} | ||||
| 
 | ||||
| 	for envname, realname := range nameMap { | ||||
|  | @ -646,6 +655,7 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P | |||
| 	sslkey := settings["sslkey"] | ||||
| 	sslpassword := settings["sslpassword"] | ||||
| 	sslsni := settings["sslsni"] | ||||
| 	sslnegotiation := settings["sslnegotiation"] | ||||
| 
 | ||||
| 	// Match libpq default behavior | ||||
| 	if sslmode == "" { | ||||
|  | @ -657,6 +667,13 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P | |||
| 
 | ||||
| 	tlsConfig := &tls.Config{} | ||||
| 
 | ||||
| 	if sslnegotiation == "direct" { | ||||
| 		tlsConfig.NextProtos = []string{"postgresql"} | ||||
| 		if sslmode == "prefer" { | ||||
| 			sslmode = "require" | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	if sslrootcert != "" { | ||||
| 		var caCertPool *x509.CertPool | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										10
									
								
								vendor/github.com/jackc/pgx/v5/pgconn/pgconn.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/jackc/pgx/v5/pgconn/pgconn.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -325,7 +325,15 @@ func connectOne(ctx context.Context, config *Config, connectConfig *connectOneCo | |||
| 	if connectConfig.tlsConfig != nil { | ||||
| 		pgConn.contextWatcher = ctxwatch.NewContextWatcher(&DeadlineContextWatcherHandler{Conn: pgConn.conn}) | ||||
| 		pgConn.contextWatcher.Watch(ctx) | ||||
| 		tlsConn, err := startTLS(pgConn.conn, connectConfig.tlsConfig) | ||||
| 		var ( | ||||
| 			tlsConn net.Conn | ||||
| 			err     error | ||||
| 		) | ||||
| 		if config.SSLNegotiation == "direct" { | ||||
| 			tlsConn = tls.Client(pgConn.conn, connectConfig.tlsConfig) | ||||
| 		} else { | ||||
| 			tlsConn, err = startTLS(pgConn.conn, connectConfig.tlsConfig) | ||||
| 		} | ||||
| 		pgConn.contextWatcher.Unwatch() // Always unwatch `netConn` after TLS. | ||||
| 		if err != nil { | ||||
| 			pgConn.conn.Close() | ||||
|  |  | |||
							
								
								
									
										55
									
								
								vendor/github.com/jackc/pgx/v5/pgtype/pgtype.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										55
									
								
								vendor/github.com/jackc/pgx/v5/pgtype/pgtype.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -202,7 +202,6 @@ type Map struct { | |||
| 
 | ||||
| 	reflectTypeToType map[reflect.Type]*Type | ||||
| 
 | ||||
| 	memoizedScanPlans   map[uint32]map[reflect.Type][2]ScanPlan | ||||
| 	memoizedEncodePlans map[uint32]map[reflect.Type][2]EncodePlan | ||||
| 
 | ||||
| 	// TryWrapEncodePlanFuncs is a slice of functions that will wrap a value that cannot be encoded by the Codec. Every | ||||
|  | @ -236,7 +235,6 @@ func NewMap() *Map { | |||
| 		reflectTypeToName: make(map[reflect.Type]string), | ||||
| 		oidToFormatCode:   make(map[uint32]int16), | ||||
| 
 | ||||
| 		memoizedScanPlans:   make(map[uint32]map[reflect.Type][2]ScanPlan), | ||||
| 		memoizedEncodePlans: make(map[uint32]map[reflect.Type][2]EncodePlan), | ||||
| 
 | ||||
| 		TryWrapEncodePlanFuncs: []TryWrapEncodePlanFunc{ | ||||
|  | @ -276,9 +274,6 @@ func (m *Map) RegisterType(t *Type) { | |||
| 
 | ||||
| 	// Invalidated by type registration | ||||
| 	m.reflectTypeToType = nil | ||||
| 	for k := range m.memoizedScanPlans { | ||||
| 		delete(m.memoizedScanPlans, k) | ||||
| 	} | ||||
| 	for k := range m.memoizedEncodePlans { | ||||
| 		delete(m.memoizedEncodePlans, k) | ||||
| 	} | ||||
|  | @ -292,9 +287,6 @@ func (m *Map) RegisterDefaultPgType(value any, name string) { | |||
| 
 | ||||
| 	// Invalidated by type registration | ||||
| 	m.reflectTypeToType = nil | ||||
| 	for k := range m.memoizedScanPlans { | ||||
| 		delete(m.memoizedScanPlans, k) | ||||
| 	} | ||||
| 	for k := range m.memoizedEncodePlans { | ||||
| 		delete(m.memoizedEncodePlans, k) | ||||
| 	} | ||||
|  | @ -1067,32 +1059,14 @@ func (plan *wrapPtrArrayReflectScanPlan) Scan(src []byte, target any) error { | |||
| 
 | ||||
| // PlanScan prepares a plan to scan a value into target. | ||||
| func (m *Map) PlanScan(oid uint32, formatCode int16, target any) ScanPlan { | ||||
| 	return m.planScanDepth(oid, formatCode, target, 0) | ||||
| 	return m.planScan(oid, formatCode, target, 0) | ||||
| } | ||||
| 
 | ||||
| func (m *Map) planScanDepth(oid uint32, formatCode int16, target any, depth int) ScanPlan { | ||||
| func (m *Map) planScan(oid uint32, formatCode int16, target any, depth int) ScanPlan { | ||||
| 	if depth > 8 { | ||||
| 		return &scanPlanFail{m: m, oid: oid, formatCode: formatCode} | ||||
| 	} | ||||
| 
 | ||||
| 	oidMemo := m.memoizedScanPlans[oid] | ||||
| 	if oidMemo == nil { | ||||
| 		oidMemo = make(map[reflect.Type][2]ScanPlan) | ||||
| 		m.memoizedScanPlans[oid] = oidMemo | ||||
| 	} | ||||
| 	targetReflectType := reflect.TypeOf(target) | ||||
| 	typeMemo := oidMemo[targetReflectType] | ||||
| 	plan := typeMemo[formatCode] | ||||
| 	if plan == nil { | ||||
| 		plan = m.planScan(oid, formatCode, target, depth) | ||||
| 		typeMemo[formatCode] = plan | ||||
| 		oidMemo[targetReflectType] = typeMemo | ||||
| 	} | ||||
| 
 | ||||
| 	return plan | ||||
| } | ||||
| 
 | ||||
| func (m *Map) planScan(oid uint32, formatCode int16, target any, depth int) ScanPlan { | ||||
| 	if target == nil { | ||||
| 		return &scanPlanFail{m: m, oid: oid, formatCode: formatCode} | ||||
| 	} | ||||
|  | @ -1152,7 +1126,7 @@ func (m *Map) planScan(oid uint32, formatCode int16, target any, depth int) Scan | |||
| 
 | ||||
| 	for _, f := range m.TryWrapScanPlanFuncs { | ||||
| 		if wrapperPlan, nextDst, ok := f(target); ok { | ||||
| 			if nextPlan := m.planScanDepth(oid, formatCode, nextDst, depth+1); nextPlan != nil { | ||||
| 			if nextPlan := m.planScan(oid, formatCode, nextDst, depth+1); nextPlan != nil { | ||||
| 				if _, failed := nextPlan.(*scanPlanFail); !failed { | ||||
| 					wrapperPlan.SetNext(nextPlan) | ||||
| 					return wrapperPlan | ||||
|  | @ -1209,7 +1183,7 @@ func codecDecodeToTextFormat(codec Codec, m *Map, oid uint32, format int16, src | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| // PlanEncode returns an Encode plan for encoding value into PostgreSQL format for oid and format. If no plan can be | ||||
| // PlanEncode returns an EncodePlan for encoding value into PostgreSQL format for oid and format. If no plan can be | ||||
| // found then nil is returned. | ||||
| func (m *Map) PlanEncode(oid uint32, format int16, value any) EncodePlan { | ||||
| 	return m.planEncodeDepth(oid, format, value, 0) | ||||
|  | @ -2032,26 +2006,7 @@ func (w *sqlScannerWrapper) Scan(src any) error { | |||
| 	return w.m.Scan(t.OID, TextFormatCode, bufSrc, w.v) | ||||
| } | ||||
| 
 | ||||
| // canBeNil returns true if value can be nil. | ||||
| func canBeNil(value any) bool { | ||||
| 	refVal := reflect.ValueOf(value) | ||||
| 	kind := refVal.Kind() | ||||
| 	switch kind { | ||||
| 	case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: | ||||
| 		return true | ||||
| 	default: | ||||
| 		return false | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| // valuerReflectType is a reflect.Type for driver.Valuer. It has confusing syntax because reflect.TypeOf returns nil | ||||
| // when it's argument is a nil interface value. So we use a pointer to the interface and call Elem to get the actual | ||||
| // type. Yuck. | ||||
| // | ||||
| // This can be simplified in Go 1.22 with reflect.TypeFor. | ||||
| // | ||||
| // var valuerReflectType = reflect.TypeFor[driver.Valuer]() | ||||
| var valuerReflectType = reflect.TypeOf((*driver.Valuer)(nil)).Elem() | ||||
| var valuerReflectType = reflect.TypeFor[driver.Valuer]() | ||||
| 
 | ||||
| // isNilDriverValuer returns true if value is any type of nil unless it implements driver.Valuer. *T is not considered to implement | ||||
| // driver.Valuer if it is only implemented by T. | ||||
|  |  | |||
							
								
								
									
										1
									
								
								vendor/github.com/jackc/pgx/v5/pgtype/pgtype_default.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/jackc/pgx/v5/pgtype/pgtype_default.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -23,7 +23,6 @@ func initDefaultMap() { | |||
| 		reflectTypeToName: make(map[reflect.Type]string), | ||||
| 		oidToFormatCode:   make(map[uint32]int16), | ||||
| 
 | ||||
| 		memoizedScanPlans:   make(map[uint32]map[reflect.Type][2]ScanPlan), | ||||
| 		memoizedEncodePlans: make(map[uint32]map[reflect.Type][2]EncodePlan), | ||||
| 
 | ||||
| 		TryWrapEncodePlanFuncs: []TryWrapEncodePlanFunc{ | ||||
|  |  | |||
							
								
								
									
										11
									
								
								vendor/github.com/jackc/pgx/v5/rows.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/jackc/pgx/v5/rows.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -188,6 +188,17 @@ func (rows *baseRows) Close() { | |||
| 	} else if rows.queryTracer != nil { | ||||
| 		rows.queryTracer.TraceQueryEnd(rows.ctx, rows.conn, TraceQueryEndData{rows.commandTag, rows.err}) | ||||
| 	} | ||||
| 
 | ||||
| 	// Zero references to other memory allocations. This allows them to be GC'd even when the Rows still referenced. In | ||||
| 	// particular, when using pgxpool GC could be delayed as pgxpool.poolRows are allocated in large slices. | ||||
| 	// | ||||
| 	// https://github.com/jackc/pgx/pull/2269 | ||||
| 	rows.values = nil | ||||
| 	rows.scanPlans = nil | ||||
| 	rows.scanTypes = nil | ||||
| 	rows.ctx = nil | ||||
| 	rows.sql = "" | ||||
| 	rows.args = nil | ||||
| } | ||||
| 
 | ||||
| func (rows *baseRows) CommandTag() pgconn.CommandTag { | ||||
|  |  | |||
							
								
								
									
										3
									
								
								vendor/github.com/jackc/pgx/v5/stdlib/sql.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/github.com/jackc/pgx/v5/stdlib/sql.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -216,7 +216,8 @@ func OpenDB(config pgx.ConnConfig, opts ...OptionOpenDB) *sql.DB { | |||
| 
 | ||||
| // OpenDBFromPool creates a new *sql.DB from the given *pgxpool.Pool. Note that this method automatically sets the | ||||
| // maximum number of idle connections in *sql.DB to zero, since they must be managed from the *pgxpool.Pool. This is | ||||
| // required to avoid acquiring all the connections from the pgxpool and starving any direct users of the pgxpool. | ||||
| // required to avoid acquiring all the connections from the pgxpool and starving any direct users of the pgxpool. Note | ||||
| // that closing the returned *sql.DB will not close the *pgxpool.Pool. | ||||
| func OpenDBFromPool(pool *pgxpool.Pool, opts ...OptionOpenDB) *sql.DB { | ||||
| 	c := GetPoolConnector(pool, opts...) | ||||
| 	db := sql.OpenDB(c) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue