Skip to content

Commit 0a636b3

Browse files
committedSep 4, 2011
Issue #13281: Fix Projax XSS issues (unescaped value attributes)
Projax sucks. This is why it was replaced with jQuery in the master branch. However master-1.2.x still uses the older Projax code. The Projax library doesn't attempt to escape values before dumping them in HTML output, thus leading to XSS issues. The easiest workaround is to pass in already-escaped values to the Projax functions. This issue was reported by High-Tech Bridge SA Security Research Lab as part of their advisory #HTB23045, available at https://www.htbridge.ch/advisory/multiple_vulnerabilities_in_mantisbt.html
1 parent 4b7492d commit 0a636b3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎bug_report_page.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
</select>
292292
<?php
293293
} else {
294-
projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => $f_platform, 'size' => '32', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
294+
projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => string_attribute( $f_platform ), 'size' => '32', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
295295
}
296296
?>
297297
</td>
@@ -308,7 +308,7 @@
308308
</select>
309309
<?php
310310
} else {
311-
projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => $f_os, 'size' => '32', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
311+
projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => string_attribute( $f_os ), 'size' => '32', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
312312
}
313313
?>
314314
</td>
@@ -327,7 +327,7 @@
327327
</select>
328328
<?php
329329
} else {
330-
projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => $f_os_build, 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
330+
projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => string_attribute( $f_os_build ), 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
331331
}
332332
?>
333333
</td>

‎bug_update_advanced_page.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@
438438
print_platform_option_list( $tpl_bug->platform );
439439
echo '</select>';
440440
} else {
441-
projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => $tpl_bug->platform, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
441+
projax_autocomplete( 'platform_get_with_prefix', 'platform', array( 'value' => string_attribute( $tpl_bug->platform ), 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
442442
}
443443

444444
echo '</td>';
@@ -456,7 +456,7 @@
456456
print_os_option_list( $tpl_bug->os );
457457
echo '</select>';
458458
} else {
459-
projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => $tpl_bug->os, 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
459+
projax_autocomplete( 'os_get_with_prefix', 'os', array( 'value' => string_attribute( $tpl_bug->os ), 'size' => '16', 'maxlength' => '32', 'tabindex' => helper_get_tab_index_value() ) );
460460
}
461461

462462
echo '</td>';
@@ -474,7 +474,7 @@
474474
print_os_build_option_list( $tpl_bug->os_build );
475475
echo '</select>';
476476
} else {
477-
projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => $tpl_bug->os_build, 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
477+
projax_autocomplete( 'os_build_get_with_prefix', 'os_build', array( 'value' => string_attribute( $tpl_bug->os_build ), 'size' => '16', 'maxlength' => '16', 'tabindex' => helper_get_tab_index_value() ) );
478478
}
479479

480480
echo '</td>';

0 commit comments

Comments
 (0)
Please sign in to comment.