forked from leftypol/leftypol
pages.php: change security token of mod_user_posts_by_ip
This commit is contained in:
parent
4b49019282
commit
e87f50407c
1 changed files with 3 additions and 2 deletions
|
@ -1052,10 +1052,11 @@ function mod_user_posts_by_ip(Context $ctx, string $ip, string $encoded_cursor =
|
||||||
$args['boards'] = $boards;
|
$args['boards'] = $boards;
|
||||||
$args['token'] = make_secure_link_token('ban');
|
$args['token'] = make_secure_link_token('ban');
|
||||||
|
|
||||||
|
// Since the security token is only used to send requests to create notes and remove bans, use "?/IP/" as the url.
|
||||||
if (empty($encoded_cursor)) {
|
if (empty($encoded_cursor)) {
|
||||||
$args['security_token'] = make_secure_link_token("user_posts/ip/$ip");
|
$args['security_token'] = make_secure_link_token("IP/$ip");
|
||||||
} else {
|
} else {
|
||||||
$args['security_token'] = make_secure_link_token("user_posts/ip/$ip/cursor/$encoded_cursor");
|
$args['security_token'] = make_secure_link_token("IP/$ip/cursor/$encoded_cursor");
|
||||||
}
|
}
|
||||||
|
|
||||||
mod_page(\sprintf('%s: %s', _('IP'), \htmlspecialchars($ip)), 'mod/view_ip.html', $args, $args['hostname']);
|
mod_page(\sprintf('%s: %s', _('IP'), \htmlspecialchars($ip)), 'mod/view_ip.html', $args, $args['hostname']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue