Skip to content

Commit 96673b2

Browse files
committed
Fix HTML injection in mediaFileList (Secunia advisory SA49196)
1 parent c0c314b commit 96673b2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

inc/template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ function tpl_mediaFileList(){
11511151
echo '<div class="panelHeader">'.NL;
11521152
echo '<h3>';
11531153
$tabTitle = ($NS) ? $NS : '['.$lang['mediaroot'].']';
1154-
printf($lang['media_' . $opened_tab], '<strong>'.$tabTitle.'</strong>');
1154+
printf($lang['media_' . $opened_tab], '<strong>'.hsc($tabTitle).'</strong>');
11551155
echo '</h3>'.NL;
11561156
if ($opened_tab === 'search' || $opened_tab === 'files') {
11571157
media_tab_files_options();

lib/exe/ajax.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
header('Content-Type: text/html; charset=utf-8');
1515

16-
1716
//call the requested function
1817
if(isset($_POST['call'])){
1918
$call = $_POST['call'];
@@ -204,7 +203,7 @@ function ajax_medialist(){
204203
global $conf;
205204
global $NS;
206205

207-
$NS = $_POST['ns'];
206+
$NS = cleanID($_POST['ns']);
208207
if ($_POST['do'] == 'media') {
209208
tpl_mediaFileList();
210209
} else {

0 commit comments

Comments
 (0)