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:
23
vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
generated
vendored
23
vendor/google.golang.org/protobuf/reflect/protodesc/desc.go
generated
vendored
@ -13,6 +13,9 @@
|
||||
package protodesc
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"google.golang.org/protobuf/internal/editionssupport"
|
||||
"google.golang.org/protobuf/internal/errors"
|
||||
"google.golang.org/protobuf/internal/filedesc"
|
||||
"google.golang.org/protobuf/internal/pragma"
|
||||
@ -91,21 +94,27 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot
|
||||
switch fd.GetSyntax() {
|
||||
case "proto2", "":
|
||||
f.L1.Syntax = protoreflect.Proto2
|
||||
f.L1.Edition = filedesc.EditionProto2
|
||||
case "proto3":
|
||||
f.L1.Syntax = protoreflect.Proto3
|
||||
f.L1.Edition = filedesc.EditionProto3
|
||||
case "editions":
|
||||
f.L1.Syntax = protoreflect.Editions
|
||||
f.L1.Edition = fromEditionProto(fd.GetEdition())
|
||||
default:
|
||||
return nil, errors.New("invalid syntax: %q", fd.GetSyntax())
|
||||
}
|
||||
if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < SupportedEditionsMinimum || fd.GetEdition() > SupportedEditionsMaximum) {
|
||||
return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition())
|
||||
}
|
||||
f.L1.Path = fd.GetName()
|
||||
if f.L1.Path == "" {
|
||||
return nil, errors.New("file path must be populated")
|
||||
}
|
||||
if f.L1.Syntax == protoreflect.Editions && (fd.GetEdition() < editionssupport.Minimum || fd.GetEdition() > editionssupport.Maximum) {
|
||||
// Allow cmd/protoc-gen-go/testdata to use any edition for easier
|
||||
// testing of upcoming edition features.
|
||||
if !strings.HasPrefix(fd.GetName(), "cmd/protoc-gen-go/testdata/") {
|
||||
return nil, errors.New("use of edition %v not yet supported by the Go Protobuf runtime", fd.GetEdition())
|
||||
}
|
||||
}
|
||||
f.L1.Package = protoreflect.FullName(fd.GetPackage())
|
||||
if !f.L1.Package.IsValid() && f.L1.Package != "" {
|
||||
return nil, errors.New("invalid package: %q", f.L1.Package)
|
||||
@ -114,9 +123,7 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot
|
||||
opts = proto.Clone(opts).(*descriptorpb.FileOptions)
|
||||
f.L2.Options = func() protoreflect.ProtoMessage { return opts }
|
||||
}
|
||||
if f.L1.Syntax == protoreflect.Editions {
|
||||
initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures())
|
||||
}
|
||||
initFileDescFromFeatureSet(f, fd.GetOptions().GetFeatures())
|
||||
|
||||
f.L2.Imports = make(filedesc.FileImports, len(fd.GetDependency()))
|
||||
for _, i := range fd.GetPublicDependency() {
|
||||
@ -219,10 +226,10 @@ func (o FileOptions) New(fd *descriptorpb.FileDescriptorProto, r Resolver) (prot
|
||||
if err := validateEnumDeclarations(f.L1.Enums.List, fd.GetEnumType()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := validateMessageDeclarations(f.L1.Messages.List, fd.GetMessageType()); err != nil {
|
||||
if err := validateMessageDeclarations(f, f.L1.Messages.List, fd.GetMessageType()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := validateExtensionDeclarations(f.L1.Extensions.List, fd.GetExtension()); err != nil {
|
||||
if err := validateExtensionDeclarations(f, f.L1.Extensions.List, fd.GetExtension()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user