diff options
author | David M <davidmj@users.sourceforge.net> | 2007-04-04 05:06:51 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-04-04 05:06:51 +0000 |
commit | 3eec9b84d1c9eab8262f976a4efe07d36bdc0265 (patch) | |
tree | b4412f64b0f9f4ded7ca5645baa0469f1ffe50c2 /phpBB | |
parent | 7c2832fb42e3c942dfe7323e36d50fbf1cb97dd4 (diff) | |
download | forums-3eec9b84d1c9eab8262f976a4efe07d36bdc0265.tar forums-3eec9b84d1c9eab8262f976a4efe07d36bdc0265.tar.gz forums-3eec9b84d1c9eab8262f976a4efe07d36bdc0265.tar.bz2 forums-3eec9b84d1c9eab8262f976a4efe07d36bdc0265.tar.xz forums-3eec9b84d1c9eab8262f976a4efe07d36bdc0265.zip |
#9601
git-svn-id: file:///svn/phpbb/trunk@7279 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index 56235d8e88..cb7b43fb27 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -209,10 +209,14 @@ class acp_database $delete = request_var('delete', ''); $file = request_var('file', ''); - preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches); + if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches)) + { + trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $file_name = $phpbb_root_path . 'store/' . $matches[0]; - if (!(file_exists($file_name) && is_readable($file_name))) + if (!file_exists($file_name) || !is_readable($file_name))) { trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } |