mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
- Some fixes
git-svn-id: file:///svn/phpbb/trunk@6077 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -56,7 +56,7 @@ class acp_bbcodes
|
||||
break;
|
||||
|
||||
case 'modify':
|
||||
$sql = 'SELECT bbcode_id
|
||||
$sql = 'SELECT bbcode_id, bbcode_tag
|
||||
FROM ' . BBCODES_TABLE . '
|
||||
WHERE bbcode_id = ' . $bbcode_id;
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -111,6 +111,24 @@ class acp_bbcodes
|
||||
|
||||
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
||||
|
||||
// Make sure the user didn't pick a "bad" name for the BBCode tag.
|
||||
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=');
|
||||
|
||||
if (($action == 'modify' && $data['bbcode_tag'] !== $row['bbcode_tag']) || ($action == 'create'))
|
||||
{
|
||||
$sql = 'SELECT 1 as test
|
||||
FROM ' . BBCODES_TABLE . "
|
||||
WHERE LOWER(bbcode_tag) = '" . $db->sql_escape(strtolower($data['bbcode_tag'])) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
$info = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($info['test'] === '1' || in_array(strtolower($data['bbcode_tag']), $hard_coded))
|
||||
{
|
||||
trigger_error('BBCODE_INVALID_TAG_NAME');
|
||||
}
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'bbcode_tag' => $data['bbcode_tag'],
|
||||
'bbcode_match' => $bbcode_match,
|
||||
|
@@ -1099,7 +1099,7 @@ class acp_database
|
||||
if ($delete)
|
||||
{
|
||||
unlink($file_name);
|
||||
trigger_error($user->lang['BACKUP_SUCCESS']);
|
||||
trigger_error($user->lang['BACKUP_DELETE']);
|
||||
}
|
||||
|
||||
$data = file_get_contents($file_name);
|
||||
|
Reference in New Issue
Block a user