Skip to content

Commit

Permalink
Fix XSS in search page
Browse files Browse the repository at this point in the history
Dmitry Ivanov [d1m0ck](https://twitter.com/d1m0ck) reported[*1] a
security vulnerability in the Source Integration plugin's search results
page, allowing an attacker to inject arbitrary HTML or javascript code
(the latter, only if MantisBT's default CSP are disabled).

Proper escaping of the permalink resolves the issue.

Fixes #205

[*1]: http://openbugbounty.org/incidents/218993/
  • Loading branch information
dregad committed Mar 16, 2017
1 parent f4b67d7 commit b014da5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/pages/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
<div class="table-responsive">

<div class="widget-toolbox padding-8 clearfix">
<a class="btn btn-xs btn-primary btn-white btn-round" href="<?php echo plugin_page( 'search' ) . $t_permalink ?>">
<a class="btn btn-xs btn-primary btn-white btn-round" href="<?php echo plugin_page( 'search' ) . string_attribute( $t_permalink ) ?>">
<?php echo plugin_lang_get( 'permalink' ) ?>
</a>
<a class="btn btn-xs btn-primary btn-white btn-round" href="<?php echo plugin_page( 'search_page' ) . $t_permalink ?>">
<a class="btn btn-xs btn-primary btn-white btn-round" href="<?php echo plugin_page( 'search_page' ) . string_attribute( $t_permalink ) ?>">
<?php echo plugin_lang_get( 'modify_search' ) ?>
</a>
<a class="btn btn-xs btn-primary btn-white btn-round" href="<?php echo plugin_page( 'search_page' ) ?>">
Expand Down

0 comments on commit b014da5

Please sign in to comment.