mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
caddyfile: reject cyclic imports (#4022)
* caddyfile: reject recursive self-imports * caddyfile: detect and reject cyclic imports of snippets and files * caddyfile: do not be stickler about connected nodes not being connected already * caddyfile: include missing test artifacts of cyclic imports * address review comments
This commit is contained in:
parent
03b5debd95
commit
3903642aa7
8 changed files with 193 additions and 5 deletions
|
|
@ -35,9 +35,11 @@ type (
|
|||
|
||||
// Token represents a single parsable unit.
|
||||
Token struct {
|
||||
File string
|
||||
Line int
|
||||
Text string
|
||||
File string
|
||||
Line int
|
||||
Text string
|
||||
inSnippet bool
|
||||
snippetName string
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue