mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
fix: handle network error on SETINFO (#3295) (CVE-2025-29923)
* fix: handle network error on SETINFO This fix addresses potential out of order responses as described in `CVE-2025-29923` * fix: deprecate DisableIndentity and introduce DisableIdentity Both options will work before V10. In v10 DisableIndentity will be dropped. The preferred flag to use is `DisableIdentity`.
This commit is contained in:
24
universal.go
24
universal.go
@ -61,14 +61,25 @@ type UniversalOptions struct {
|
||||
RouteByLatency bool
|
||||
RouteRandomly bool
|
||||
|
||||
// The sentinel master name.
|
||||
// Only failover clients.
|
||||
|
||||
// MasterName is the sentinel master name.
|
||||
// Only for failover clients.
|
||||
MasterName string
|
||||
|
||||
// DisableIndentity - Disable set-lib on connect.
|
||||
//
|
||||
// default: false
|
||||
//
|
||||
// Deprecated: Use DisableIdentity instead.
|
||||
DisableIndentity bool
|
||||
IdentitySuffix string
|
||||
UnstableResp3 bool
|
||||
|
||||
// DisableIdentity is used to disable CLIENT SETINFO command on connect.
|
||||
//
|
||||
// default: false
|
||||
DisableIdentity bool
|
||||
|
||||
IdentitySuffix string
|
||||
UnstableResp3 bool
|
||||
|
||||
}
|
||||
|
||||
// Cluster returns cluster options created from the universal options.
|
||||
@ -113,6 +124,7 @@ func (o *UniversalOptions) Cluster() *ClusterOptions {
|
||||
|
||||
TLSConfig: o.TLSConfig,
|
||||
|
||||
DisableIdentity: o.DisableIdentity,
|
||||
DisableIndentity: o.DisableIndentity,
|
||||
IdentitySuffix: o.IdentitySuffix,
|
||||
UnstableResp3: o.UnstableResp3,
|
||||
@ -160,6 +172,7 @@ func (o *UniversalOptions) Failover() *FailoverOptions {
|
||||
|
||||
TLSConfig: o.TLSConfig,
|
||||
|
||||
DisableIdentity: o.DisableIdentity,
|
||||
DisableIndentity: o.DisableIndentity,
|
||||
IdentitySuffix: o.IdentitySuffix,
|
||||
UnstableResp3: o.UnstableResp3,
|
||||
@ -204,6 +217,7 @@ func (o *UniversalOptions) Simple() *Options {
|
||||
|
||||
TLSConfig: o.TLSConfig,
|
||||
|
||||
DisableIdentity: o.DisableIdentity,
|
||||
DisableIndentity: o.DisableIndentity,
|
||||
IdentitySuffix: o.IdentitySuffix,
|
||||
UnstableResp3: o.UnstableResp3,
|
||||
|
Reference in New Issue
Block a user