diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index b98756a34b..19c4f6e4f1 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -203,7 +203,7 @@ class acp_database $file = $request->variable('file', ''); $download = $request->variable('download', ''); - if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches)) + if (!preg_match('#^backup_\d{10,}_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches)) { trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } @@ -402,7 +402,7 @@ class acp_database { while (($file = readdir($dh)) !== false) { - if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches)) + if (preg_match('#^backup_(\d{10,})_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches)) { if (in_array($matches[2], $methods)) { diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3fec88a354..99f65a0e92 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -115,7 +115,7 @@ function gen_rand_string_friendly($num_chars = 8) */ function unique_id() { - return gen_rand_string(32); + return strtolower(gen_rand_string(16)); } /** |