Skip to content

Commit 8ffba1c

Browse files
committed
Fix: 2974
1 parent 3ebd9e4 commit 8ffba1c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

web/search/index.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
// Check token
1212
verify_csrf($_GET);
1313

14+
if (empty($_GET['u'])){
15+
$_GET['u'] = '';
16+
}
17+
if (empty($_GET['q'])){
18+
$_GET['q'] = '';
19+
}
1420
// Data
1521
$q = quoteshellarg($_GET['q']);
1622
$u = quoteshellarg($_GET['u']);

web/templates/pages/list_search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
</div>
144144
<div class="clearfix l-unit__stat-col--left text-center"><?=translate_date($value['DATE'])?></div>
145145
<div class="clearfix l-unit__stat-col--left text-center"><b>
146-
<a href="/search/?q=<?=htmlspecialchars($q); ?>&u=<?=$value['USER']; ?>"><?=$value['USER']; ?></a></b></div>
146+
<a href="/search/?q=<?=htmlentities($_GET['q']); ?>&u=<?=$value['USER']; ?>&token=<?=$_SESSION['token']?>"><?=$value['USER']; ?></a></b></div>
147147
<div class="clearfix l-unit__stat-col--left text-center"><?=_($object)?></b></div>
148148
</div>
149149
</div>

0 commit comments

Comments
 (0)