forked from mirrors/gotosocial
[chore]: Bump github.com/miekg/dns from 1.1.53 to 1.1.54 (#1727)
Bumps [github.com/miekg/dns](https://github.com/miekg/dns) from 1.1.53 to 1.1.54. - [Release notes](https://github.com/miekg/dns/releases) - [Changelog](https://github.com/miekg/dns/blob/master/Makefile.release) - [Commits](https://github.com/miekg/dns/compare/v1.1.53...v1.1.54) --- updated-dependencies: - dependency-name: github.com/miekg/dns dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
ead286a67b
commit
5904e3b4ee
9 changed files with 52 additions and 116 deletions
2
go.mod
2
go.mod
|
@ -34,7 +34,7 @@ require (
|
||||||
github.com/jackc/pgconn v1.14.0
|
github.com/jackc/pgconn v1.14.0
|
||||||
github.com/jackc/pgx/v4 v4.18.1
|
github.com/jackc/pgx/v4 v4.18.1
|
||||||
github.com/microcosm-cc/bluemonday v1.0.23
|
github.com/microcosm-cc/bluemonday v1.0.23
|
||||||
github.com/miekg/dns v1.1.53
|
github.com/miekg/dns v1.1.54
|
||||||
github.com/minio/minio-go/v7 v7.0.52
|
github.com/minio/minio-go/v7 v7.0.52
|
||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/oklog/ulid v1.3.1
|
github.com/oklog/ulid v1.3.1
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -438,8 +438,8 @@ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
|
||||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
|
github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY=
|
github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4=
|
github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4=
|
||||||
github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw=
|
github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI=
|
||||||
github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
|
github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY=
|
||||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||||
github.com/minio/minio-go/v7 v7.0.52 h1:8XhG36F6oKQUDDSuz6dY3rioMzovKjW40W6ANuN0Dps=
|
github.com/minio/minio-go/v7 v7.0.52 h1:8XhG36F6oKQUDDSuz6dY3rioMzovKjW40W6ANuN0Dps=
|
||||||
|
|
32
vendor/github.com/miekg/dns/client.go
generated
vendored
32
vendor/github.com/miekg/dns/client.go
generated
vendored
|
@ -6,7 +6,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -62,8 +61,14 @@ type Client struct {
|
||||||
WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
|
WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
|
||||||
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2)
|
TsigSecret map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be in canonical form (lowercase, fqdn, see RFC 4034 Section 6.2)
|
||||||
TsigProvider TsigProvider // An implementation of the TsigProvider interface. If defined it replaces TsigSecret and is used for all TSIG operations.
|
TsigProvider TsigProvider // An implementation of the TsigProvider interface. If defined it replaces TsigSecret and is used for all TSIG operations.
|
||||||
SingleInflight bool // if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass
|
|
||||||
group singleflight
|
// SingleInflight previously serialised multiple concurrent queries for the
|
||||||
|
// same Qname, Qtype and Qclass to ensure only one would be in flight at a
|
||||||
|
// time.
|
||||||
|
//
|
||||||
|
// Deprecated: This is a no-op. Callers should implement their own in flight
|
||||||
|
// query caching if needed. See github.com/miekg/dns/issues/1449.
|
||||||
|
SingleInflight bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exchange performs a synchronous UDP query. It sends the message m to the address
|
// Exchange performs a synchronous UDP query. It sends the message m to the address
|
||||||
|
@ -185,26 +190,7 @@ func (c *Client) ExchangeWithConn(m *Msg, conn *Conn) (r *Msg, rtt time.Duration
|
||||||
return c.exchangeWithConnContext(context.Background(), m, conn)
|
return c.exchangeWithConnContext(context.Background(), m, conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) exchangeWithConnContext(ctx context.Context, m *Msg, conn *Conn) (r *Msg, rtt time.Duration, err error) {
|
func (c *Client) exchangeWithConnContext(ctx context.Context, m *Msg, co *Conn) (r *Msg, rtt time.Duration, err error) {
|
||||||
if !c.SingleInflight {
|
|
||||||
return c.exchangeContext(ctx, m, conn)
|
|
||||||
}
|
|
||||||
|
|
||||||
q := m.Question[0]
|
|
||||||
key := fmt.Sprintf("%s:%d:%d", q.Name, q.Qtype, q.Qclass)
|
|
||||||
r, rtt, err, shared := c.group.Do(key, func() (*Msg, time.Duration, error) {
|
|
||||||
// When we're doing singleflight we don't want one context cancellation, cancel _all_ outstanding queries.
|
|
||||||
// Hence we ignore the context and use Background().
|
|
||||||
return c.exchangeContext(context.Background(), m, conn)
|
|
||||||
})
|
|
||||||
if r != nil && shared {
|
|
||||||
r = r.Copy()
|
|
||||||
}
|
|
||||||
|
|
||||||
return r, rtt, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) exchangeContext(ctx context.Context, m *Msg, co *Conn) (r *Msg, rtt time.Duration, err error) {
|
|
||||||
opt := m.IsEdns0()
|
opt := m.IsEdns0()
|
||||||
// If EDNS0 is used use that for size.
|
// If EDNS0 is used use that for size.
|
||||||
if opt != nil && opt.UDPSize() >= MinMsgSize {
|
if opt != nil && opt.UDPSize() >= MinMsgSize {
|
||||||
|
|
20
vendor/github.com/miekg/dns/defaults.go
generated
vendored
20
vendor/github.com/miekg/dns/defaults.go
generated
vendored
|
@ -272,18 +272,24 @@ func IsMsg(buf []byte) error {
|
||||||
|
|
||||||
// IsFqdn checks if a domain name is fully qualified.
|
// IsFqdn checks if a domain name is fully qualified.
|
||||||
func IsFqdn(s string) bool {
|
func IsFqdn(s string) bool {
|
||||||
s2 := strings.TrimSuffix(s, ".")
|
// Check for (and remove) a trailing dot, returning if there isn't one.
|
||||||
if s == s2 {
|
if s == "" || s[len(s)-1] != '.' {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
s = s[:len(s)-1]
|
||||||
|
|
||||||
i := strings.LastIndexFunc(s2, func(r rune) bool {
|
// If we don't have an escape sequence before the final dot, we know it's
|
||||||
|
// fully qualified and can return here.
|
||||||
|
if s == "" || s[len(s)-1] != '\\' {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise we have to check if the dot is escaped or not by checking if
|
||||||
|
// there are an odd or even number of escape sequences before the dot.
|
||||||
|
i := strings.LastIndexFunc(s, func(r rune) bool {
|
||||||
return r != '\\'
|
return r != '\\'
|
||||||
})
|
})
|
||||||
|
return (len(s)-i)%2 != 0
|
||||||
// Test whether we have an even number of escape sequences before
|
|
||||||
// the dot or none.
|
|
||||||
return (len(s2)-i)%2 != 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsRRset checks if a set of RRs is a valid RRset as defined by RFC 2181.
|
// IsRRset checks if a set of RRs is a valid RRset as defined by RFC 2181.
|
||||||
|
|
20
vendor/github.com/miekg/dns/scan.go
generated
vendored
20
vendor/github.com/miekg/dns/scan.go
generated
vendored
|
@ -10,13 +10,13 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxTok = 2048 // Largest token we can return.
|
const maxTok = 512 // Token buffer start size, and growth size amount.
|
||||||
|
|
||||||
// The maximum depth of $INCLUDE directives supported by the
|
// The maximum depth of $INCLUDE directives supported by the
|
||||||
// ZoneParser API.
|
// ZoneParser API.
|
||||||
const maxIncludeDepth = 7
|
const maxIncludeDepth = 7
|
||||||
|
|
||||||
// Tokinize a RFC 1035 zone file. The tokenizer will normalize it:
|
// Tokenize a RFC 1035 zone file. The tokenizer will normalize it:
|
||||||
// * Add ownernames if they are left blank;
|
// * Add ownernames if they are left blank;
|
||||||
// * Suppress sequences of spaces;
|
// * Suppress sequences of spaces;
|
||||||
// * Make each RR fit on one line (_NEWLINE is send as last)
|
// * Make each RR fit on one line (_NEWLINE is send as last)
|
||||||
|
@ -765,8 +765,8 @@ func (zl *zlexer) Next() (lex, bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
str [maxTok]byte // Hold string text
|
str = make([]byte, maxTok) // Hold string text
|
||||||
com [maxTok]byte // Hold comment text
|
com = make([]byte, maxTok) // Hold comment text
|
||||||
|
|
||||||
stri int // Offset in str (0 means empty)
|
stri int // Offset in str (0 means empty)
|
||||||
comi int // Offset in com (0 means empty)
|
comi int // Offset in com (0 means empty)
|
||||||
|
@ -785,14 +785,12 @@ func (zl *zlexer) Next() (lex, bool) {
|
||||||
l.line, l.column = zl.line, zl.column
|
l.line, l.column = zl.line, zl.column
|
||||||
|
|
||||||
if stri >= len(str) {
|
if stri >= len(str) {
|
||||||
l.token = "token length insufficient for parsing"
|
// if buffer length is insufficient, increase it.
|
||||||
l.err = true
|
str = append(str[:], make([]byte, maxTok)...)
|
||||||
return *l, true
|
|
||||||
}
|
}
|
||||||
if comi >= len(com) {
|
if comi >= len(com) {
|
||||||
l.token = "comment length insufficient for parsing"
|
// if buffer length is insufficient, increase it.
|
||||||
l.err = true
|
com = append(com[:], make([]byte, maxTok)...)
|
||||||
return *l, true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch x {
|
switch x {
|
||||||
|
@ -816,7 +814,7 @@ func (zl *zlexer) Next() (lex, bool) {
|
||||||
if stri == 0 {
|
if stri == 0 {
|
||||||
// Space directly in the beginning, handled in the grammar
|
// Space directly in the beginning, handled in the grammar
|
||||||
} else if zl.owner {
|
} else if zl.owner {
|
||||||
// If we have a string and its the first, make it an owner
|
// If we have a string and it's the first, make it an owner
|
||||||
l.value = zOwner
|
l.value = zOwner
|
||||||
l.token = string(str[:stri])
|
l.token = string(str[:stri])
|
||||||
|
|
||||||
|
|
13
vendor/github.com/miekg/dns/scan_rr.go
generated
vendored
13
vendor/github.com/miekg/dns/scan_rr.go
generated
vendored
|
@ -904,11 +904,18 @@ func (rr *RRSIG) parse(c *zlexer, o string) *ParseError {
|
||||||
|
|
||||||
c.Next() // zBlank
|
c.Next() // zBlank
|
||||||
l, _ = c.Next()
|
l, _ = c.Next()
|
||||||
i, e := strconv.ParseUint(l.token, 10, 8)
|
if l.err {
|
||||||
if e != nil || l.err {
|
|
||||||
return &ParseError{"", "bad RRSIG Algorithm", l}
|
return &ParseError{"", "bad RRSIG Algorithm", l}
|
||||||
}
|
}
|
||||||
rr.Algorithm = uint8(i)
|
i, e := strconv.ParseUint(l.token, 10, 8)
|
||||||
|
rr.Algorithm = uint8(i) // if 0 we'll check the mnemonic in the if
|
||||||
|
if e != nil {
|
||||||
|
v, ok := StringToAlgorithm[l.token]
|
||||||
|
if !ok {
|
||||||
|
return &ParseError{"", "bad RRSIG Algorithm", l}
|
||||||
|
}
|
||||||
|
rr.Algorithm = v
|
||||||
|
}
|
||||||
|
|
||||||
c.Next() // zBlank
|
c.Next() // zBlank
|
||||||
l, _ = c.Next()
|
l, _ = c.Next()
|
||||||
|
|
61
vendor/github.com/miekg/dns/singleinflight.go
generated
vendored
61
vendor/github.com/miekg/dns/singleinflight.go
generated
vendored
|
@ -1,61 +0,0 @@
|
||||||
// Copyright 2013 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
// Adapted for dns package usage by Miek Gieben.
|
|
||||||
|
|
||||||
package dns
|
|
||||||
|
|
||||||
import "sync"
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
// call is an in-flight or completed singleflight.Do call
|
|
||||||
type call struct {
|
|
||||||
wg sync.WaitGroup
|
|
||||||
val *Msg
|
|
||||||
rtt time.Duration
|
|
||||||
err error
|
|
||||||
dups int
|
|
||||||
}
|
|
||||||
|
|
||||||
// singleflight represents a class of work and forms a namespace in
|
|
||||||
// which units of work can be executed with duplicate suppression.
|
|
||||||
type singleflight struct {
|
|
||||||
sync.Mutex // protects m
|
|
||||||
m map[string]*call // lazily initialized
|
|
||||||
|
|
||||||
dontDeleteForTesting bool // this is only to be used by TestConcurrentExchanges
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do executes and returns the results of the given function, making
|
|
||||||
// sure that only one execution is in-flight for a given key at a
|
|
||||||
// time. If a duplicate comes in, the duplicate caller waits for the
|
|
||||||
// original to complete and receives the same results.
|
|
||||||
// The return value shared indicates whether v was given to multiple callers.
|
|
||||||
func (g *singleflight) Do(key string, fn func() (*Msg, time.Duration, error)) (v *Msg, rtt time.Duration, err error, shared bool) {
|
|
||||||
g.Lock()
|
|
||||||
if g.m == nil {
|
|
||||||
g.m = make(map[string]*call)
|
|
||||||
}
|
|
||||||
if c, ok := g.m[key]; ok {
|
|
||||||
c.dups++
|
|
||||||
g.Unlock()
|
|
||||||
c.wg.Wait()
|
|
||||||
return c.val, c.rtt, c.err, true
|
|
||||||
}
|
|
||||||
c := new(call)
|
|
||||||
c.wg.Add(1)
|
|
||||||
g.m[key] = c
|
|
||||||
g.Unlock()
|
|
||||||
|
|
||||||
c.val, c.rtt, c.err = fn()
|
|
||||||
c.wg.Done()
|
|
||||||
|
|
||||||
if !g.dontDeleteForTesting {
|
|
||||||
g.Lock()
|
|
||||||
delete(g.m, key)
|
|
||||||
g.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
return c.val, c.rtt, c.err, c.dups > 0
|
|
||||||
}
|
|
2
vendor/github.com/miekg/dns/version.go
generated
vendored
2
vendor/github.com/miekg/dns/version.go
generated
vendored
|
@ -3,7 +3,7 @@ package dns
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// Version is current version of this library.
|
// Version is current version of this library.
|
||||||
var Version = v{1, 1, 53}
|
var Version = v{1, 1, 54}
|
||||||
|
|
||||||
// v holds the version of this library.
|
// v holds the version of this library.
|
||||||
type v struct {
|
type v struct {
|
||||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -347,7 +347,7 @@ github.com/mattn/go-isatty
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
github.com/microcosm-cc/bluemonday
|
github.com/microcosm-cc/bluemonday
|
||||||
github.com/microcosm-cc/bluemonday/css
|
github.com/microcosm-cc/bluemonday/css
|
||||||
# github.com/miekg/dns v1.1.53
|
# github.com/miekg/dns v1.1.54
|
||||||
## explicit; go 1.19
|
## explicit; go 1.19
|
||||||
github.com/miekg/dns
|
github.com/miekg/dns
|
||||||
# github.com/minio/md5-simd v1.1.2
|
# github.com/minio/md5-simd v1.1.2
|
||||||
|
|
Loading…
Reference in a new issue