diff options
author | Ruben Calvo <rubencm@gmail.com> | 2018-10-30 11:16:51 +0000 |
---|---|---|
committer | Ruben Calvo <rubencm@gmail.com> | 2018-10-30 11:18:34 +0000 |
commit | 1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6 (patch) | |
tree | e0acdca3e8c62916e31da95f1f782ed2d7a819d6 | |
parent | dc109b195261e83465914e2457bd16e8158d9c21 (diff) | |
download | forums-1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6.tar forums-1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6.tar.gz forums-1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6.tar.bz2 forums-1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6.tar.xz forums-1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6.zip |
[ticket/15860] Fix format of backup files
PHPBB3-15860
-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..fbc4f045ad 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]+\.(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]+\.(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..79d88fb3a5 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(32)); } /** |