Fix some potential security hazards

This commit is contained in:
xiaomlove
2023-05-20 00:17:17 +08:00
parent 167af06cfa
commit fa95279e66
11 changed files with 16 additions and 15 deletions

View File

@@ -8,7 +8,7 @@ if (!user_can('userprofile'))
permissiondenied();
else
{
$ip = trim($_GET['ip']);
$ip = htmlspecialchars(trim($_GET['ip']));
if ($ip)
{
$regex = "/^(((1?\d{1,2})|(2[0-4]\d)|(25[0-5]))(\.\b|$)){4}$/";