Skip to content

Commit

Permalink
strtolower file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
craigdietrich authored Jun 28, 2022
1 parent 40da06b commit 3386fe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/application/libraries/File_Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function is_allowed($file) {
if (stristr($file, './')) return false;
if ('.' == substr($file, 0, 1)) return false;
if ('google' == substr($file, 0, 6)) return false;
$ext = pathinfo($file, PATHINFO_EXTENSION);
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
if (empty($ext)) return false; // Require a file extension
if ('php' == $ext || 'php' == substr($ext, 0, 3)) return false;
if (stristr($file, '.php')) return false;
Expand Down Expand Up @@ -257,4 +257,4 @@ private function getStorage($bookSlug, $adapter, $adapterOptions) {
}
}

?>
?>

0 comments on commit 3386fe4

Please sign in to comment.