1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/10824] Add json sanitizer class

PHPBB3-10824
This commit is contained in:
Marc Alexander
2016-01-16 18:51:13 +01:00
parent 8244aff9cb
commit 04e791d9fe
3 changed files with 43 additions and 11 deletions

View File

@@ -1154,7 +1154,7 @@ class acp_styles
}
$json = file_get_contents($this->styles_path . $dir . '/composer.json');
$style_data = json_decode($json, true);
$style_data = \phpbb\json_sanitizer::sanitize(json_decode($json, true));
if (!is_array($style_data) || !isset($style_data['type']) || $style_data['type'] !== 'phpbb-style')
{