Skip to content

Commit

Permalink
reflected XSS vulnerability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mkucej committed May 31, 2023
1 parent 187e5ff commit 3f2c647
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/items.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,15 @@ private function pageTop(string $collection, array $get, array $input): string {
continue;
}

$get_search_query = $this->sanitation->html($get['search_query'][$i]);

/** @var Bootstrap\Button $el */
$el = $this->di->get('Button');

$el->context("dark");
$el->componentSize("small");
$el->addClass("d-inline-block mr-1 mb-2 rounded-0");
$el->html("<b>{$this->type_to_readable[$type]}</b> &mdash; {$get['search_query'][$i]}");
$el->html("<b>{$this->type_to_readable[$type]}</b> &mdash; {$get_search_query}");
$tags_html .= $el->render();

$el = null;
Expand Down

0 comments on commit 3f2c647

Please sign in to comment.