diff --git a/go.mod b/go.mod index 5109b9e67c..0fed40382e 100644 --- a/go.mod +++ b/go.mod @@ -203,4 +203,4 @@ require ( replace github.com/apcera/gssapi => github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b -replace golang.org/x/net => github.com/openshift-sustaining/net v0.50.0-sec.2 +replace golang.org/x/net => github.com/openshift-sustaining/net v0.50.0-sec.4 diff --git a/go.sum b/go.sum index e42e32ef96..0ea05964f9 100644 --- a/go.sum +++ b/go.sum @@ -323,8 +323,8 @@ github.com/opencontainers/runtime-spec v1.2.1 h1:S4k4ryNgEpxW1dzyqffOmhI1BHYcjzU github.com/opencontainers/runtime-spec v1.2.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.12.0 h1:6n5JV4Cf+4y0KNXW48TLj5DwfXpvWlxXplUkdTrmPb8= github.com/opencontainers/selinux v1.12.0/go.mod h1:BTPX+bjVbWGXw7ZZWUbdENt8w0htPSrlgOOysQaU62U= -github.com/openshift-sustaining/net v0.50.0-sec.2 h1:eVij2KKwmcqyE0pWu8ymnD6RvMb+k/8Gd7Z1lC3Q69w= -github.com/openshift-sustaining/net v0.50.0-sec.2/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= +github.com/openshift-sustaining/net v0.50.0-sec.4 h1:jmkVQIRNrS0DAs24K0yLYJHqH5e+svnbXb/ihoTPKRs= +github.com/openshift-sustaining/net v0.50.0-sec.4/go.mod h1:UgoSli3F/pBgdJBHCTc+tp3gmrU4XswgGRgtnwWTfyM= github.com/openshift/api v0.0.0-20250710082954-674ad74beffc h1:DpweDMwuEuZKVUmYeqj3kBKdt5q8lGwSoIqpnLb0A9M= github.com/openshift/api v0.0.0-20250710082954-674ad74beffc/go.mod h1:SPLf21TYPipzCO67BURkCfK6dcIIxx0oNRVWaOyRcXM= github.com/openshift/build-machinery-go v0.0.0-20250602125535-1b6d00b8c37c h1:gJvhduWIrpzoUTwrJjjeul+hGETKkhRhEZosBg/X3Hg= diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index 6598c1f7b3..058dfb2164 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -156,6 +156,7 @@ type Tokenizer struct { // incremented on each call to TagAttr. pendingAttr [2]span attr [][2]span + attrNames map[string]bool nAttrReturned int // rawTag is the "script" in "" that closes the next token. If // non-empty, the subsequent call to Next will return a raw or RCDATA text @@ -867,6 +868,7 @@ func (z *Tokenizer) readStartTag() TokenType { func (z *Tokenizer) readTag(saveAttr bool) { z.attr = z.attr[:0] z.nAttrReturned = 0 + clear(z.attrNames) // Read the tag name and attribute key/value pairs. z.readTagName() if z.skipWhiteSpace(); z.err != nil { @@ -880,9 +882,11 @@ func (z *Tokenizer) readTag(saveAttr bool) { z.raw.end-- z.readTagAttrKey() z.readTagAttrVal() - // Save pendingAttr if saveAttr and that attribute has a non-empty key. - if saveAttr && z.pendingAttr[0].start != z.pendingAttr[0].end { + // Save pendingAttr if saveAttr and that attribute has a non-empty key, and the key hasn't been seen before. + key := strings.ToLower(string(z.buf[z.pendingAttr[0].start:z.pendingAttr[0].end])) + if saveAttr && z.pendingAttr[0].start != z.pendingAttr[0].end && !z.attrNames[key] { z.attr = append(z.attr, z.pendingAttr) + z.attrNames[key] = true } if z.skipWhiteSpace(); z.err != nil { break @@ -1273,8 +1277,9 @@ func NewTokenizer(r io.Reader) *Tokenizer { // The input is assumed to be UTF-8 encoded. func NewTokenizerFragment(r io.Reader, contextTag string) *Tokenizer { z := &Tokenizer{ - r: r, - buf: make([]byte, 0, 4096), + r: r, + buf: make([]byte, 0, 4096), + attrNames: make(map[string]bool), } if contextTag != "" { switch s := strings.ToLower(contextTag); s { diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 8cf64b78e2..3b514a38bd 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -2865,6 +2865,9 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { var seenMaxConcurrentStreams bool err := f.ForeachSetting(func(s Setting) error { + if err := s.Valid(); err != nil { + return err + } switch s.ID { case SettingMaxFrameSize: cc.maxFrameSize = s.Val @@ -2896,9 +2899,6 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { cc.henc.SetMaxDynamicTableSize(s.Val) cc.peerMaxHeaderTableSize = s.Val case SettingEnableConnectProtocol: - if err := s.Valid(); err != nil { - return err - } // If the peer wants to send us SETTINGS_ENABLE_CONNECT_PROTOCOL, // we require that it do so in the first SETTINGS frame. // diff --git a/vendor/modules.txt b/vendor/modules.txt index 362921c3c0..50d5fe9777 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -959,7 +959,7 @@ golang.org/x/crypto/sha3 ## explicit; go 1.20 golang.org/x/exp/maps golang.org/x/exp/mmap -# golang.org/x/net v0.49.0 => github.com/openshift-sustaining/net v0.50.0-sec.2 +# golang.org/x/net v0.49.0 => github.com/openshift-sustaining/net v0.50.0-sec.4 ## explicit; go 1.24.0 golang.org/x/net/context golang.org/x/net/html @@ -1849,4 +1849,4 @@ sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 sigs.k8s.io/yaml/goyaml.v3 # github.com/apcera/gssapi => github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b -# golang.org/x/net => github.com/openshift-sustaining/net v0.50.0-sec.2 +# golang.org/x/net => github.com/openshift-sustaining/net v0.50.0-sec.4