1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-02 11:36:22 +01:00

fix php recursive search

This commit is contained in:
Tim W 2021-09-22 22:40:47 +01:00
parent 3760e1d41e
commit 9473d00274

View File

@ -358,8 +358,11 @@ function safe_glob($pattern, $flags=0, $start_date=null, $end_date=null) {
&& (!is_link($path."/".$file))
)
) {
$glob = array_merge($glob, array_prepend(safe_glob($path.'/'.$file.'/'.$mask, $flags, $start_date, $end_date),
($flags&GLOB_PATH?'':$file.'/')));
$newglob = safe_glob($path.'/'.$file.'/'.$mask, $flags, $start_date, $end_date);
if ($newglob !== false) {
$glob = array_merge($glob, array_prepend($newglob,
($flags&GLOB_PATH?'':$file.'/')));
}
}
// Match file mask
if (fnmatch($mask,$file)) {