Skip to content

Commit

Permalink
Fix: Argument of a function used in an include/require, could lead to…
Browse files Browse the repository at this point in the history
… File Inclusion

Error from semgrep
audit.php.lang.security.file.inclusion-arg
  • Loading branch information
vyskoczilova authored Aug 29, 2024
1 parent c0fee7a commit 4f5260c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mbstring/Mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,8 @@ private static function title_case(array $s)

private static function getData($file)
{
if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
return require $file;
if (file_exists(__DIR__.'/Resources/unidata/'.$file.'.php')) {
return require __DIR__.'/Resources/unidata/'.$file.'.php';
}

return false;
Expand Down

0 comments on commit 4f5260c

Please sign in to comment.