mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 14:28:56 +00:00
[ticket/15860] Fix format of backup files
PHPBB3-15860
This commit is contained in:
parent
dc109b1952
commit
1f14f7c327
2 changed files with 3 additions and 3 deletions
|
@ -203,7 +203,7 @@ class acp_database
|
||||||
$file = $request->variable('file', '');
|
$file = $request->variable('file', '');
|
||||||
$download = $request->variable('download', '');
|
$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);
|
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)
|
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))
|
if (in_array($matches[2], $methods))
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,7 +115,7 @@ function gen_rand_string_friendly($num_chars = 8)
|
||||||
*/
|
*/
|
||||||
function unique_id()
|
function unique_id()
|
||||||
{
|
{
|
||||||
return gen_rand_string(32);
|
return strtolower(gen_rand_string(32));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue