SECURITY: avoid XSS vulnerability within the Tags field in BlogEntry

This commit is contained in:
carlos barberis 2013-02-07 13:31:08 +13:00
parent ff439a5ac0
commit c2a6ba5b69

View File

@ -100,7 +100,7 @@ class BlogEntry extends Page {
$link = $this->getParent() ? $this->getParent()->Link('tag') : ''; $link = $this->getParent() ? $this->getParent()->Link('tag') : '';
foreach($tags as $tag) { foreach($tags as $tag) {
$output->push(new ArrayData(array( $output->push(new ArrayData(array(
'Tag' => $tag, 'Tag' => Convert::raw2xml($tag),
'Link' => $link . '/' . urlencode($tag), 'Link' => $link . '/' . urlencode($tag),
'URLTag' => urlencode($tag) 'URLTag' => urlencode($tag)
))); )));