mirror of https://github.com/daffainfo/nuclei.git
Added support for urlencoded variable variation
parent
4669ee22ce
commit
514d6f94ec
|
@ -6,7 +6,7 @@ import (
|
|||
"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
|
||||
// input contains unresolved {{<pattern-here>}} variables.
|
||||
|
|
|
@ -15,6 +15,7 @@ func TestUnresolvedVariablesCheck(t *testing.T) {
|
|||
{"{{test}}", errors.New("unresolved variables found: test")},
|
||||
{"{{test}}/{{another}}", errors.New("unresolved variables found: test,another")},
|
||||
{"test", nil},
|
||||
{"%7b%7btest%7d%7d", errors.New("unresolved variables found: test")},
|
||||
}
|
||||
for _, test := range tests {
|
||||
err := ContainsUnresolvedVariables(test.data)
|
||||
|
|
Loading…
Reference in New Issue