mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 11:15:28 +00:00
Ensure path is resolved before using it
This commit is contained in:
parent
97069afb3c
commit
0983e8b9fa
@ -124,20 +124,20 @@ func (r *Runner) RunEnumeration() {
|
||||
|
||||
// parses user input, handle file/directory cases and produce a list of unique templates
|
||||
for _, t := range r.options.Templates {
|
||||
// determine file/directory
|
||||
isFile, err := isFilePath(t)
|
||||
if err != nil {
|
||||
gologger.Errorf("Could not stat '%s': %s\n", t, err)
|
||||
continue
|
||||
}
|
||||
|
||||
// convert relative to absolute path
|
||||
// resolve and convert relative to absolute path
|
||||
absPath, err := r.translateToAbsolutePath(t)
|
||||
if err != nil {
|
||||
gologger.Errorf("Could not find template file '%s': %s\n", t, err)
|
||||
continue
|
||||
}
|
||||
|
||||
// determine file/directory
|
||||
isFile, err := isFilePath(absPath)
|
||||
if err != nil {
|
||||
gologger.Errorf("Could not stat '%s': %s\n", absPath, err)
|
||||
continue
|
||||
}
|
||||
|
||||
// test for uniqueness
|
||||
if !isNewPath(absPath, processed) {
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user