SF Bug #3497660 - XSS flaws via 'export', 'add_value_form' and 'dn' variables
This commit is contained in:
@@ -34,7 +34,7 @@ if ($request['attribute']->isReadOnly())
|
||||
# Render the form
|
||||
if (! strcasecmp($request['attr'],'objectclass') || get_request('meth','REQUEST') != 'ajax') {
|
||||
# Render the form.
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b> %s <b>%s</b>',_('Add new'),$request['attr'],_('value to'),get_rdn($request['dn'])));
|
||||
$request['page']->drawTitle(sprintf('%s <b>%s</b> %s <b>%s</b>',_('Add new'),htmlspecialchars($request['attr']),_('value to'),htmlspecialchars(get_rdn($request['dn']))));
|
||||
$request['page']->drawSubTitle();
|
||||
|
||||
if (! strcasecmp($request['attr'],'objectclass')) {
|
||||
|
@@ -29,12 +29,12 @@ if ($request['file']) {
|
||||
|
||||
header('Content-type: application/download');
|
||||
header(sprintf('Content-Disposition: inline; filename="%s.%s"','export',$types['extension'].($request['export']->isCompressed() ? '.gz' : '')));
|
||||
$request['export']->export();
|
||||
echo $request['export']->export();
|
||||
die();
|
||||
|
||||
} else {
|
||||
print '<span style="font-size: 14px; font-family: courier;"><pre>';
|
||||
$request['export']->export();
|
||||
echo htmlspecialchars($request['export']->export());
|
||||
print '</pre></span>';
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user