mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-23 15:23:28 +00:00
Security fix - containerd to 1.7.27
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
6
vendor/google.golang.org/protobuf/encoding/protojson/decode.go
generated
vendored
6
vendor/google.golang.org/protobuf/encoding/protojson/decode.go
generated
vendored
@ -102,7 +102,7 @@ type decoder struct {
|
||||
}
|
||||
|
||||
// newError returns an error object with position info.
|
||||
func (d decoder) newError(pos int, f string, x ...interface{}) error {
|
||||
func (d decoder) newError(pos int, f string, x ...any) error {
|
||||
line, column := d.Position(pos)
|
||||
head := fmt.Sprintf("(line %d:%d): ", line, column)
|
||||
return errors.New(head+f, x...)
|
||||
@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error {
|
||||
}
|
||||
|
||||
// syntaxError returns a syntax error for given position.
|
||||
func (d decoder) syntaxError(pos int, f string, x ...interface{}) error {
|
||||
func (d decoder) syntaxError(pos int, f string, x ...any) error {
|
||||
line, column := d.Position(pos)
|
||||
head := fmt.Sprintf("syntax error (line %d:%d): ", line, column)
|
||||
return errors.New(head+f, x...)
|
||||
@ -351,7 +351,7 @@ func (d decoder) unmarshalScalar(fd protoreflect.FieldDescriptor) (protoreflect.
|
||||
panic(fmt.Sprintf("unmarshalScalar: invalid scalar kind %v", kind))
|
||||
}
|
||||
|
||||
return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v type: %v", kind, tok.RawString())
|
||||
return protoreflect.Value{}, d.newError(tok.Pos(), "invalid value for %v field %v: %v", kind, fd.JSONName(), tok.RawString())
|
||||
}
|
||||
|
||||
func unmarshalInt(tok json.Token, bitSize int) (protoreflect.Value, bool) {
|
||||
|
24
vendor/google.golang.org/protobuf/encoding/protojson/encode.go
generated
vendored
24
vendor/google.golang.org/protobuf/encoding/protojson/encode.go
generated
vendored
@ -25,15 +25,17 @@ const defaultIndent = " "
|
||||
|
||||
// Format formats the message as a multiline string.
|
||||
// This function is only intended for human consumption and ignores errors.
|
||||
// Do not depend on the output being stable. It may change over time across
|
||||
// different versions of the program.
|
||||
// Do not depend on the output being stable. Its output will change across
|
||||
// different builds of your program, even when using the same version of the
|
||||
// protobuf module.
|
||||
func Format(m proto.Message) string {
|
||||
return MarshalOptions{Multiline: true}.Format(m)
|
||||
}
|
||||
|
||||
// Marshal writes the given [proto.Message] in JSON format using default options.
|
||||
// Do not depend on the output being stable. It may change over time across
|
||||
// different versions of the program.
|
||||
// Do not depend on the output being stable. Its output will change across
|
||||
// different builds of your program, even when using the same version of the
|
||||
// protobuf module.
|
||||
func Marshal(m proto.Message) ([]byte, error) {
|
||||
return MarshalOptions{}.Marshal(m)
|
||||
}
|
||||
@ -110,8 +112,9 @@ type MarshalOptions struct {
|
||||
|
||||
// Format formats the message as a string.
|
||||
// This method is only intended for human consumption and ignores errors.
|
||||
// Do not depend on the output being stable. It may change over time across
|
||||
// different versions of the program.
|
||||
// Do not depend on the output being stable. Its output will change across
|
||||
// different builds of your program, even when using the same version of the
|
||||
// protobuf module.
|
||||
func (o MarshalOptions) Format(m proto.Message) string {
|
||||
if m == nil || !m.ProtoReflect().IsValid() {
|
||||
return "<nil>" // invalid syntax, but okay since this is for debugging
|
||||
@ -122,8 +125,9 @@ func (o MarshalOptions) Format(m proto.Message) string {
|
||||
}
|
||||
|
||||
// Marshal marshals the given [proto.Message] in the JSON format using options in
|
||||
// MarshalOptions. Do not depend on the output being stable. It may change over
|
||||
// time across different versions of the program.
|
||||
// Do not depend on the output being stable. Its output will change across
|
||||
// different builds of your program, even when using the same version of the
|
||||
// protobuf module.
|
||||
func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {
|
||||
return o.marshal(nil, m)
|
||||
}
|
||||
@ -212,9 +216,7 @@ func (m unpopulatedFieldRanger) Range(f func(protoreflect.FieldDescriptor, proto
|
||||
}
|
||||
|
||||
v := m.Get(fd)
|
||||
isProto2Scalar := fd.Syntax() == protoreflect.Proto2 && fd.Default().IsValid()
|
||||
isSingularMessage := fd.Cardinality() != protoreflect.Repeated && fd.Message() != nil
|
||||
if isProto2Scalar || isSingularMessage {
|
||||
if fd.HasPresence() {
|
||||
if m.skipNull {
|
||||
continue
|
||||
}
|
||||
|
6
vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
generated
vendored
6
vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
generated
vendored
@ -348,7 +348,11 @@ func (d decoder) unmarshalAnyValue(unmarshal unmarshalFunc, m protoreflect.Messa
|
||||
switch tok.Kind() {
|
||||
case json.ObjectClose:
|
||||
if !found {
|
||||
return d.newError(tok.Pos(), `missing "value" field`)
|
||||
// We tolerate an omitted `value` field with the google.protobuf.Empty Well-Known-Type,
|
||||
// for compatibility with other proto runtimes that have interpreted the spec differently.
|
||||
if m.Descriptor().FullName() != genid.Empty_message_fullname {
|
||||
return d.newError(tok.Pos(), `missing "value" field`)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
|
Reference in New Issue
Block a user