Skip to content

Commit

Permalink
Prevent infinite loop while fetching git tags/branches
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Nov 21, 2022
1 parent 10d56ca commit aa974d4
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -247,7 +247,18 @@ abstract class RepositoryProvider {
break

for( def item : list ) {
result.add( parse(item) )
final entry = parse(item)
if( result.contains(entry) ) {
log.debug("Duplicate entry detected on request '$request'")
return result
}
result.add(entry)
}

// prevent endless looping
if( page==100 ) {
log.warn("Too many requests '$request'")
break
}
}
return result
Expand Down

0 comments on commit aa974d4

Please sign in to comment.