mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
Fix formatImg() security issue
This commit is contained in:
@@ -1195,3 +1195,13 @@ function has_role_work_seeding($uid)
|
||||
return $result;
|
||||
}
|
||||
|
||||
function is_danger_url($url): bool
|
||||
{
|
||||
$dangerScriptsPattern = "/(logout|login|ajax|announce|scrape|adduser|modtask|take.*)\.php/i";
|
||||
$match = preg_match($dangerScriptsPattern, $url);
|
||||
if ($match > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user