htmlentities -> htmlspecialchars

This commit is contained in:
2024-12-06 15:35:38 +08:00
parent daa005f029
commit d9b2d13caa
184 changed files with 410 additions and 405 deletions

View File

@@ -82,18 +82,18 @@ class online{
$tmp_ip=explode(',',$REMOTE_ADDR);
$this->ip =(htmlentities($tmp_ip[0],ENT_QUOTES,"UTF-8"));
$this->ip =(htmlspecialchars($tmp_ip[0],ENT_QUOTES,"UTF-8"));
}
if(isset($_SESSION[$OJ_NAME.'_'.'user_id']))
$this->ua = htmlentities($_SESSION[$OJ_NAME.'_'.'user_id'],ENT_QUOTES,"UTF-8");
$this->ua = htmlspecialchars($_SESSION[$OJ_NAME.'_'.'user_id'],ENT_QUOTES,"UTF-8");
else
$this->ua ="guest";
$this->ua .= "@".htmlentities($_SERVER['HTTP_USER_AGENT'],ENT_QUOTES,"UTF-8");
$this->ua .= "@".htmlspecialchars($_SERVER['HTTP_USER_AGENT'],ENT_QUOTES,"UTF-8");
$this->uri = ($_SERVER['PHP_SELF']);
if(isset($_SERVER['HTTP_REFERER'])){
$this->refer = (htmlentities($_SERVER['HTTP_REFERER'],ENT_QUOTES,"UTF-8"));
$this->refer = (htmlspecialchars($_SERVER['HTTP_REFERER'],ENT_QUOTES,"UTF-8"));
}
$this->hash = md5(session_id().$this->ip);