Fix false-positive replacements from compatibility sweep

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/89922108-1604-44ae-949d-358d32b9d70a

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-04-23 14:08:38 +00:00 committed by GitHub
parent 6c0ca40e09
commit 97010974d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 10 additions and 11 deletions

View file

@ -170,7 +170,7 @@ function ogpHome()
{ {
if(isset($settings['check_expiry_by']) and $settings['check_expiry_by'] == "once_logged_in") if(isset($settings['check_expiry_by']) and $settings['check_expiry_by'] == "once_logged_in")
{ {
if($db->check_expire_date($_SESSION['user_id'], is_numeric($server_home['home_id']) ? (int)$server_home['home_id'] : strtotime($server_home['home_id']))) if($db->check_expire_date($_SESSION['user_id'], $server_home['home_id']))
continue; continue;
} }
$servers_by_game_name["$server_home[game_name]"][] = $server_home; $servers_by_game_name["$server_home[game_name]"][] = $server_home;

View file

@ -289,7 +289,7 @@ class OGPDatabaseMySQL extends OGPDatabase
return $results; return $results;
} }
public function get_user_count((array)$search_field) { public function get_user_count($search_field) {
$search_field = $this->realEscapeSingle($search_field); $search_field = $this->realEscapeSingle($search_field);
$sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."users "; $sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."users ";
@ -310,7 +310,7 @@ class OGPDatabaseMySQL extends OGPDatabase
return $this->listQuery($query); return $this->listQuery($query);
} }
public function get_group_count((array)$search_field){ public function get_group_count($search_field){
$search_field = $this->realEscapeSingle($search_field); $search_field = $this->realEscapeSingle($search_field);
$sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."user_group_info "; $sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."user_group_info ";
@ -3392,7 +3392,7 @@ class OGPDatabaseMySQL extends OGPDatabase
$this->query("INSERT INTO OGP_DB_PREFIXlogger (date, user_id, ip, message) VALUE (FROM_UNIXTIME(UNIX_TIMESTAMP(), '%d-%m-%Y %H:%i:%s'), $user_id, '$client_ip', '$message');"); $this->query("INSERT INTO OGP_DB_PREFIXlogger (date, user_id, ip, message) VALUE (FROM_UNIXTIME(UNIX_TIMESTAMP(), '%d-%m-%Y %H:%i:%s'), $user_id, '$client_ip', '$message');");
} }
public function get_logger_count((array)$search_field) { public function get_logger_count($search_field) {
$search_field = $this->realEscapeSingle($search_field); $search_field = $this->realEscapeSingle($search_field);
$sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."logger "; $sql = "SELECT COUNT(1) AS total FROM ".$this->table_prefix."logger ";

View file

@ -139,7 +139,7 @@ function exec_ogp_module() {
echo "</tbody>\n"; echo "</tbody>\n";
echo "<tfoot style='border:1px solid grey;'></tfoot>\n"; echo "<tfoot style='border:1px solid grey;'></tfoot>\n";
echo "</table>\n"; echo "</table>\n";
$count_logs = $db->get_logger_count((array)$search_field); $count_logs = $db->get_logger_count($search_field);
if (isset($_GET['search']) && !empty($_GET['search'])) { if (isset($_GET['search']) && !empty($_GET['search'])) {
$uri = '?m=administration&p=watch_logger&search='.$_GET['search'].'&limit='.$l.'&page='; $uri = '?m=administration&p=watch_logger&search='.$_GET['search'].'&limit='.$l.'&page=';
@ -149,4 +149,3 @@ function exec_ogp_module() {
echo paginationPages($count_logs[0]['total'], $p, $l, $uri, 3, 'watchLogger'); echo paginationPages($count_logs[0]['total'], $p, $l, $uri, 3, 'watchLogger');
} }
?> ?>

View file

@ -63,7 +63,7 @@ class HTMLPurifier_AttrDef_URI extends HTMLPurifier_AttrDef
do { do {
// generic validation // generic validation
$result = $uri->validate($config, is_numeric($context) ? (int)$context : strtotime($context)); $result = $uri->validate($config, $context);
if (!$result) { if (!$result) {
break; break;
} }

View file

@ -105,7 +105,7 @@ class HTMLPurifier_URI
* @param HTMLPurifier_Context $context * @param HTMLPurifier_Context $context
* @return bool True if validation/filtering succeeds, false if failure * @return bool True if validation/filtering succeeds, false if failure
*/ */
public function validate($config, is_numeric($context) ? (int)$context : strtotime($context)) public function validate($config, $context)
{ {
// ABNF definitions from RFC 3986 // ABNF definitions from RFC 3986
$chars_sub_delims = '!$&\'()*+,;='; $chars_sub_delims = '!$&\'()*+,;=';

View file

@ -149,7 +149,7 @@ function exec_ogp_module() {
echo "</table>"; echo "</table>";
if ($db->isAdmin($_SESSION['user_id'])) if ($db->isAdmin($_SESSION['user_id']))
$count_groups = $db->get_group_count((array)$search_field); $count_groups = $db->get_group_count($search_field);
else else
$count_groups = $db->getUserGroupList_count($_SESSION['user_id'],$search_field); $count_groups = $db->getUserGroupList_count($_SESSION['user_id'],$search_field);

View file

@ -131,7 +131,7 @@ function exec_ogp_module() {
} }
echo '</table><br>'; echo '</table><br>';
$count_users = $db->get_user_count((array)$search_field); $count_users = $db->get_user_count($search_field);
if(isset($_GET['search']) && !empty($_GET['search'])){ if(isset($_GET['search']) && !empty($_GET['search'])){
$uri = '?m=user_admin&search='.$_GET['search'].'&limit='.$limit_user.'&page='; $uri = '?m=user_admin&search='.$_GET['search'].'&limit='.$limit_user.'&page=';