From e87f50407c748a2d25ca749b2f2a50c631362868 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sun, 29 Dec 2024 00:01:09 +0100 Subject: [PATCH] pages.php: change security token of mod_user_posts_by_ip --- inc/mod/pages.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 56785056..2cb2c22f 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -1052,10 +1052,11 @@ function mod_user_posts_by_ip(Context $ctx, string $ip, string $encoded_cursor = $args['boards'] = $boards; $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)) { - $args['security_token'] = make_secure_link_token("user_posts/ip/$ip"); + $args['security_token'] = make_secure_link_token("IP/$ip"); } 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']);