Explorar o código

Prevent XSS silliness in memorized searches.

tassium %!s(int64=22) %!d(string=hai) anos
pai
achega
68df2a38fd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/search.php

+ 1 - 1
src/search.php

@@ -383,7 +383,7 @@ if ($recent_count > 0) {
             if (isset($attributes['search_what'][$i]) &&
                 !empty($attributes['search_what'][$i])) {
             echo html_tag( 'td', $attributes['search_folder'][$i], 'left', '', 'width="35%"' )
-               . html_tag( 'td', $attributes['search_what'][$i], 'left' )
+               . html_tag( 'td', htmlentities($attributes['search_what'][$i]), 'left' )
                . html_tag( 'td', $attributes['search_where'][$i], 'center' )
                . html_tag( 'td', '', 'right' )
                .   "<a href=search.php?count=$i&amp;submit=save>"