Skip to content

Commit

Permalink
SECURITY: Fix XSS vulnerability when viewing directories.
Browse files Browse the repository at this point in the history
Discovered by: An anonymous researcher working with
Beyond Security's SecuriTeam Secure Disclosure program
<http://www.beyondsecurity.com/ssd.html>
  • Loading branch information
mrubinsk committed Aug 6, 2015
1 parent a617fcd commit 764de60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gollem/lib/Gollem.php
Expand Up @@ -694,7 +694,7 @@ public static function directoryNavLink($currdir, $url)
if ($i == $parts_count) {
$label[] = $parts[($i - 1)];
} else {
$label[] = Horde::link($url->add('dir', $dir), sprintf(_("Up to %s"), $dir)) . $parts[($i - 1)] . '</a>';
$label[] = Horde::link($url->add('dir', $dir), sprintf(_("Up to %s"), $dir)) . htmlspecialchars($parts[($i - 1)]) . '</a>';
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gollem/templates/manager.html.php
Expand Up @@ -39,7 +39,7 @@
<input type="hidden" id="old_names" name="old_names" value="" />
<input type="hidden" id="renamefrm_oldname" name="oldname" value="" />
<input type="hidden" id="chmod" name="chmod" value="" />
<input type="hidden" id="dir" name="dir" value="<?php echo $this->dir ?>" />
<input type="hidden" id="dir" name="dir" value="<?php echo htmlspecialchars($this->dir) ?>" />
<input type="hidden" name="targetFolder" value="" />

<div class="header">
Expand Down

0 comments on commit 764de60

Please sign in to comment.