tpl: Detect and fail on infinite template recursion

Fixes #13627
This commit is contained in:
Bjørn Erik Pedersen
2025-04-20 18:20:17 +02:00
parent be3b147860
commit 1408c156d8
7 changed files with 68 additions and 38 deletions

View File

@@ -160,6 +160,7 @@ type CurrentTemplateInfoCommonOps interface {
// CurrentTemplateInfo as returned in templates.Current.
type CurrentTemplateInfo struct {
Parent *CurrentTemplateInfo
Level int
CurrentTemplateInfoOps
}