To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 4542

Show
Ignore:
Timestamp:
02/03/12 16:01:34 (4 months ago)
Author:
tboutell
Message:

Fixed #1220 XSS vulnerability in blog filters

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.5/lib/helper/aHelper.php

    r4511 r4542  
    622622// This ought to call a_button but I'm wrestling with the incompatibility of inline 
    623623// content and a_button's CSS. Notice that it's playing out rather well in the blog engine. -Tom 
     624// 
     625// Always entity-encode the label. Without this the blog filters are an XSS vulnerability 
    624626 
    625627function a_remove_filter_button($label, $url, $parameter) 
     
    636638  } 
    637639  $url = aUrl::addParams($url, $remove); 
    638   return link_to($label.'<span class="icon"></span>', url_for($url), array('class' => 'a-remove-filter-button', 'title' => 'Remove Filter: ' . $label)); 
     640  return link_to(aHtml::entities($label).'<span class="icon"></span>', url_for($url), array('class' => 'a-remove-filter-button', 'title' => 'Remove Filter: ' . $label)); 
    639641} 
    640642