aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuben Calvo <rubencm@gmail.com>2018-10-30 11:16:51 +0000
committerRuben Calvo <rubencm@gmail.com>2018-10-30 11:18:34 +0000
commit1f14f7c327e52ec67a593d3d0b87e67a4bf7ebd6 (patch)
treee0acdca3e8c62916e31da95f1f782ed2d7a819d6
parentdc109b195261e83465914e2457bd16e8158d9c21 (diff)
downloadforums-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.php4
-rw-r--r--phpBB/includes/functions.php2
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));
}
/**