1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-01 19:45:24 +02:00

Database and LDAP upgrades

Bumped underlying dependencies affecting database and LDAP connectivity.

Bumped to Go v1.14.3 and released v3.8.0.
This commit is contained in:
HarveyKandola 2020-05-21 12:32:46 +01:00
parent aaa8c3282d
commit 4fe022aa0c
310 changed files with 36835 additions and 16448 deletions

16
vendor/gopkg.in/asn1-ber.v1/ber.go generated vendored
View file

@ -5,10 +5,15 @@ import (
"errors"
"fmt"
"io"
"math"
"os"
"reflect"
)
// MaxPacketLengthBytes specifies the maximum allowed packet size when calling ReadPacket or DecodePacket. Set to 0 for
// no limit.
var MaxPacketLengthBytes int64 = math.MaxInt32
type Packet struct {
Identifier
Value interface{}
@ -207,7 +212,7 @@ func DecodeString(data []byte) string {
return string(data)
}
func parseInt64(bytes []byte) (ret int64, err error) {
func ParseInt64(bytes []byte) (ret int64, err error) {
if len(bytes) > 8 {
// We'll overflow an int64 in this case.
err = fmt.Errorf("integer too large")
@ -330,6 +335,9 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
}
// Read definite-length content
if MaxPacketLengthBytes > 0 && int64(length) > MaxPacketLengthBytes {
return nil, read, fmt.Errorf("length %d greater than maximum %d", length, MaxPacketLengthBytes)
}
content := make([]byte, length, length)
if length > 0 {
_, err := io.ReadFull(reader, content)
@ -349,11 +357,11 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
switch p.Tag {
case TagEOC:
case TagBoolean:
val, _ := parseInt64(content)
val, _ := ParseInt64(content)
p.Value = val != 0
case TagInteger:
p.Value, _ = parseInt64(content)
p.Value, _ = ParseInt64(content)
case TagBitString:
case TagOctetString:
// the actual string encoding is not known here
@ -366,7 +374,7 @@ func readPacket(reader io.Reader) (*Packet, int, error) {
case TagExternal:
case TagRealFloat:
case TagEnumerated:
p.Value, _ = parseInt64(content)
p.Value, _ = ParseInt64(content)
case TagEmbeddedPDV:
case TagUTF8String:
p.Value = DecodeString(content)