fix xsrf and added nonce
This commit is contained in:
parent
6476ebc781
commit
809627b538
208 changed files with 7166 additions and 4278 deletions
40
vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
generated
vendored
40
vendor/google.golang.org/protobuf/reflect/protodesc/proto.go
generated
vendored
|
|
@ -32,9 +32,6 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD
|
|||
if imp.IsPublic {
|
||||
p.PublicDependency = append(p.PublicDependency, int32(i))
|
||||
}
|
||||
if imp.IsWeak {
|
||||
p.WeakDependency = append(p.WeakDependency, int32(i))
|
||||
}
|
||||
}
|
||||
for i, locs := 0, file.SourceLocations(); i < locs.Len(); i++ {
|
||||
loc := locs.Get(i)
|
||||
|
|
@ -73,16 +70,27 @@ func ToFileDescriptorProto(file protoreflect.FileDescriptor) *descriptorpb.FileD
|
|||
if syntax := file.Syntax(); syntax != protoreflect.Proto2 && syntax.IsValid() {
|
||||
p.Syntax = proto.String(file.Syntax().String())
|
||||
}
|
||||
desc := file
|
||||
if fileImportDesc, ok := file.(protoreflect.FileImport); ok {
|
||||
desc = fileImportDesc.FileDescriptor
|
||||
}
|
||||
if file.Syntax() == protoreflect.Editions {
|
||||
desc := file
|
||||
if fileImportDesc, ok := file.(protoreflect.FileImport); ok {
|
||||
desc = fileImportDesc.FileDescriptor
|
||||
}
|
||||
|
||||
if editionsInterface, ok := desc.(interface{ Edition() int32 }); ok {
|
||||
p.Edition = descriptorpb.Edition(editionsInterface.Edition()).Enum()
|
||||
}
|
||||
}
|
||||
type hasOptionImports interface {
|
||||
OptionImports() protoreflect.FileImports
|
||||
}
|
||||
if opts, ok := desc.(hasOptionImports); ok {
|
||||
if optionImports := opts.OptionImports(); optionImports.Len() > 0 {
|
||||
optionDeps := make([]string, optionImports.Len())
|
||||
for i := range optionImports.Len() {
|
||||
optionDeps[i] = optionImports.Get(i).Path()
|
||||
}
|
||||
p.OptionDependency = optionDeps
|
||||
}
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
|
|
@ -126,6 +134,14 @@ func ToDescriptorProto(message protoreflect.MessageDescriptor) *descriptorpb.Des
|
|||
for i, names := 0, message.ReservedNames(); i < names.Len(); i++ {
|
||||
p.ReservedName = append(p.ReservedName, string(names.Get(i)))
|
||||
}
|
||||
type hasVisibility interface {
|
||||
Visibility() int32
|
||||
}
|
||||
if vis, ok := message.(hasVisibility); ok {
|
||||
if visibility := vis.Visibility(); visibility > 0 {
|
||||
p.Visibility = descriptorpb.SymbolVisibility(visibility).Enum()
|
||||
}
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
|
|
@ -219,6 +235,14 @@ func ToEnumDescriptorProto(enum protoreflect.EnumDescriptor) *descriptorpb.EnumD
|
|||
for i, names := 0, enum.ReservedNames(); i < names.Len(); i++ {
|
||||
p.ReservedName = append(p.ReservedName, string(names.Get(i)))
|
||||
}
|
||||
type hasVisibility interface {
|
||||
Visibility() int32
|
||||
}
|
||||
if vis, ok := enum.(hasVisibility); ok {
|
||||
if visibility := vis.Visibility(); visibility > 0 {
|
||||
p.Visibility = descriptorpb.SymbolVisibility(visibility).Enum()
|
||||
}
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue