mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 06:35:26 +00:00
fixing logic condition + removing redundant code
This commit is contained in:
parent
64bea4da8c
commit
ea9f9c9c9a
@ -167,12 +167,6 @@ func (r *Result) Merge(result *Result) {
|
||||
r.OutputExtracts = append(r.OutputExtracts, v)
|
||||
}
|
||||
}
|
||||
for _, v := range result.OutputExtracts {
|
||||
if _, ok := r.outputUnique[v]; !ok {
|
||||
r.outputUnique[v] = struct{}{}
|
||||
r.OutputExtracts = append(r.OutputExtracts, v)
|
||||
}
|
||||
}
|
||||
for k, v := range result.DynamicValues {
|
||||
r.DynamicValues[k] = v
|
||||
}
|
||||
|
||||
@ -159,7 +159,7 @@ func (request *Request) processFile(filePath, input string, previousInternalEven
|
||||
func (request *Request) processReader(reader io.Reader, filePath, input, totalBytesString string, previousInternalEvent output.InternalEvent) (*output.InternalWrappedEvent, []FileMatch, error) {
|
||||
fileReader := io.LimitReader(reader, request.maxSize)
|
||||
fileMatches, opResult := request.findMatchesWithReader(fileReader, input, filePath, totalBytesString, previousInternalEvent)
|
||||
if len(fileMatches) == 0 || opResult == nil {
|
||||
if opResult == nil && len(fileMatches) == 0 {
|
||||
return nil, nil, emptyResultErr
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user