mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-20 10:15:27 +00:00
Added support for urlencoded variable variation
This commit is contained in:
parent
4669ee22ce
commit
514d6f94ec
@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var unresolvedVariablesRegex = regexp.MustCompile(`\{\{([^}]+)\}\}["'\)\}]*`)
|
var unresolvedVariablesRegex = regexp.MustCompile(`(?:%7[B|b]|\{){2}([^}]+)(?:%7[D|d]|\}){2}["'\)\}]*`)
|
||||||
|
|
||||||
// ContainsUnresolvedVariables returns an error with variable names if the passed
|
// ContainsUnresolvedVariables returns an error with variable names if the passed
|
||||||
// input contains unresolved {{<pattern-here>}} variables.
|
// input contains unresolved {{<pattern-here>}} variables.
|
||||||
|
|||||||
@ -15,6 +15,7 @@ func TestUnresolvedVariablesCheck(t *testing.T) {
|
|||||||
{"{{test}}", errors.New("unresolved variables found: test")},
|
{"{{test}}", errors.New("unresolved variables found: test")},
|
||||||
{"{{test}}/{{another}}", errors.New("unresolved variables found: test,another")},
|
{"{{test}}/{{another}}", errors.New("unresolved variables found: test,another")},
|
||||||
{"test", nil},
|
{"test", nil},
|
||||||
|
{"%7b%7btest%7d%7d", errors.New("unresolved variables found: test")},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
err := ContainsUnresolvedVariables(test.data)
|
err := ContainsUnresolvedVariables(test.data)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user