diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-11-22 17:49:06 +0100 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-11-22 17:49:06 +0100 |
| commit | 8f67892f5ef63144f394b6913aeaa9ca3479d33d (patch) | |
| tree | 7da1c733c8054b5c9dd47905ea698f3e0ed8106e /phpBB/phpbb/version_helper.php | |
| parent | 0c4a0cac613faa9ebd467fbac1507482e79c59aa (diff) | |
| parent | 5c3b6a855944d7a370186987ebebe3a896cf76a2 (diff) | |
| download | forums-8f67892f5ef63144f394b6913aeaa9ca3479d33d.tar forums-8f67892f5ef63144f394b6913aeaa9ca3479d33d.tar.gz forums-8f67892f5ef63144f394b6913aeaa9ca3479d33d.tar.bz2 forums-8f67892f5ef63144f394b6913aeaa9ca3479d33d.tar.xz forums-8f67892f5ef63144f394b6913aeaa9ca3479d33d.zip | |
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'phpBB/phpbb/version_helper.php')
| -rw-r--r-- | phpBB/phpbb/version_helper.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php index e34bd0ba60..7387ad296e 100644 --- a/phpBB/phpbb/version_helper.php +++ b/phpBB/phpbb/version_helper.php @@ -270,6 +270,16 @@ class version_helper $info = json_decode($info, true); + // Sanitize any data we retrieve from a server + if (!empty($info)) + { + $json_sanitizer = function (&$value, $key) { + $type_cast_helper = new \phpbb\request\type_cast_helper(); + $type_cast_helper->set_var($value, $value, gettype($value), true); + }; + array_walk_recursive($info, $json_sanitizer); + } + if (empty($info['stable']) && empty($info['unstable'])) { $this->user->add_lang('acp/common'); @@ -277,15 +287,6 @@ class version_helper throw new \RuntimeException($this->user->lang('VERSIONCHECK_FAIL')); } - // Replace & with & on announcement links - foreach ($info as $stability => $branches) - { - foreach ($branches as $branch => $branch_data) - { - $info[$stability][$branch]['announcement'] = (!empty($branch_data['announcement'])) ? str_replace('&', '&', $branch_data['announcement']) : ''; - } - } - $info['stable'] = (empty($info['stable'])) ? array() : $info['stable']; $info['unstable'] = (empty($info['unstable'])) ? $info['stable'] : $info['unstable']; |
