mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/15860] Limit regexp to expected formats
PHPBB3-15860
This commit is contained in:
parent
1f14f7c327
commit
bab86aac7f
1 changed files with 1 additions and 1 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]+\.(sql(?:\.(?:gz|bz2))?)$#i', $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);
|
trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue