Skip to content
Snippets Groups Projects
Commit 79d6be9a authored by Till Brehm's avatar Till Brehm
Browse files

Fixed a typo in htmlentities function and added htmlentities to dashlet output.

parent 5902e62c
No related branches found
No related tags found
2 merge requests!700Ported XSS vulnerability fixes from stable branch,!699Fixed XSS vulnerabilities
......@@ -460,7 +460,7 @@ class functions {
if(is_array($value)) {
$out = array();
foreach($values as $key => $val) {
foreach($value as $key => $val) {
if(is_array($val)) {
$out[$key] = $this->htmlentities($val);
} else {
......
......@@ -21,6 +21,7 @@ class dashlet_databasequota {
$has_databasequota = false;
if(is_array($databases) && !empty($databases)){
$databases = $app->functions->htmlentities($databases);
$tpl->setloop('databasequota', $databases);
$has_databasequota = isset($databases[0]['used']);
}
......
......@@ -154,6 +154,7 @@ class dashlet_limits {
'percentage' => $percentage);
}
}
$rows = $app->functions->htmlentities($rows);
$tpl->setLoop('rows', $rows);
......
......@@ -21,6 +21,8 @@ class dashlet_mailquota {
$has_mailquota = false;
if(is_array($emails) && !empty($emails)){
// email username is quoted in quota.lib already, so no htmlentities here to prevent double encoding
//$emails = $app->functions->htmlentities($emails);
$tpl->setloop('mailquota', $emails);
$has_mailquota = isset($emails[0]['used']);
}
......
......@@ -21,6 +21,7 @@ class dashlet_quota {
$has_quota = false;
if(is_array($sites) && !empty($sites)){
$sites = $app->functions->htmlentities($sites);
$tpl->setloop('quota', $sites);
$has_quota = isset($sites[0]['used']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment