Resolved issue 0000702: Code Injection with picture comment

git-svn-id: http://piwigo.org/svn/trunk@2030 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2007-06-07 18:50:25 +00:00
parent 182fb00f8f
commit 3fbc92f61e
4 changed files with 6 additions and 4 deletions
+1
View File
@@ -242,5 +242,6 @@ if (isset($conf['header_notes']))
// default event handlers
add_event_handler('render_comment_content', 'htmlspecialchars');
add_event_handler('render_comment_content', 'parse_comment_content');
add_event_handler('render_comment_author', 'strip_tags');
trigger_action('init');
?>
+3 -2
View File
@@ -136,9 +136,10 @@ SELECT id,author,date,image_id,content
$template->assign_block_vars(
'comments.comment',
array(
'COMMENT_AUTHOR' => empty($row['author'])
'COMMENT_AUTHOR' => trigger_event('render_comment_author',
empty($row['author'])
? l10n('guest')
: $row['author'],
: $row['author']),
'COMMENT_DATE' => format_date(
$row['date'],