Skip to content

Commit

Permalink
Check for php code in all files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Robert committed Feb 4, 2022
1 parent 7b408ac commit a6a20f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Chase/Helga/Functions/filevalidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ function rawContainsCode(string $path)
*/
function hasMime(string $path, array $mimes)
{
if (rawContainsCode($path)) {
return false;
}
$fn = new finfo(FILEINFO_MIME);
$mime = $fn->file($path);
preg_match("/^[^;]+/", $mime, $part);
Expand Down

0 comments on commit a6a20f9

Please sign in to comment.