Skip to content

Commit

Permalink
Merge branch 'release/1.7.42.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 15, 2023
2 parents dc20945 + cf6bf7d commit 4cd1378
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.7.42.1
## 06/15/2023

2. [](#improved)
* Quick fix for `isDangerousFunction` when `$name` was a closure [#3727](https://github.com/getgrav/grav/issues/3727)

# v1.7.42
## 06/14/2023

Expand Down
2 changes: 1 addition & 1 deletion system/defines.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.7.42');
define('GRAV_VERSION', '1.7.42.1');
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
define('GRAV_TESTING', false);

Expand Down
8 changes: 5 additions & 3 deletions system/src/Grav/Common/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -2056,17 +2056,19 @@ public static function isDangerousFunction($name): bool
'forward_static_call_array',
];

$name = strtolower($name);
if (is_string($name)) {
$name = strtolower($name);
}

if ($name instanceof \Closure) {
return false;
}

if (strpos($name, "\\") !== false) {
if (is_array($name) || strpos($name, ":") !== false) {
return false;
}

if (is_array($name) || strpos($name, ":") !== false) {
if (strpos($name, "\\") !== false) {
return false;
}

Expand Down

0 comments on commit 4cd1378

Please sign in to comment.