mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 14:53:44 +08:00
1 parent
627a06cda3
commit
a2de650b52
31 files changed
+2166
-249
No files matched your search
@@ -476,14 +476,12 @@ func rewriteStructureReferences(ctx context.Context, data []byte, tag CustomTag,
|
||||
}
|
||||
}
|
||||
var patches []editorXMLPatch
|
||||
count := 0
|
||||
var walk func(*editorXML, int) error
|
||||
walk = func(node *editorXML, depth int) error {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
count++
|
||||
if depth > 128 || count > 100000 {
|
||||
if depth > 128 {
|
||||
return fmt.Errorf("custom tag structure limit exceeded")
|
||||
}
|
||||
if node.name.Space != root.name.Space {
|
||||
|
||||
Reference in new issue
Block a user