1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 01:20:40 +01:00

[ticket/security-203] Allow more characters for branch names

SECURITY-203
This commit is contained in:
Marc Alexander 2016-12-27 18:18:20 +01:00
parent ad251e4590
commit 90a77ba9d3
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -243,7 +243,7 @@ class version_helper
*
* @param bool $force_update Ignores cached data. Defaults to false.
* @param bool $force_cache Force the use of the cache. Override $force_update.
* @return string Version info
* @return array Version info
* @throws \RuntimeException
*/
public function get_versions_matching_stability($force_update = false, $force_cache = false)
@ -350,7 +350,7 @@ class version_helper
{
foreach ($versions_data as $branch => &$version_data)
{
if (!preg_match('/^[0-9]+\.[0-9]+$/', $branch))
if (!preg_match('/^[0-9a-z\-\.]+$/i', $branch))
{
unset($versions_data[$branch]);
continue;