我遇到了一个我一生都无法解决的问题。我为客户设置了一个超级简单的 CMS。CMS 的每个不同页面都包含一个名为 session.php 的文件。
session_start();
$username = $_SESSION['siteadmin'];
if (!$_SESSION['siteadmin']){
header( 'Location: login.php?status=2' );
}
时不时地,随机的东西会从数据库中消失。因此,我设置了一个粗略的日志系统,通过 CMS 记录任何操作。嗯,又发生了。日志显示:
Logged in **.**.237.209 17:18 <-- thats me
Deleted board member id 12 195.42.102.25 16:49
Deleted board member id 15 195.42.102.25 16:49
Deleted board member id 8 195.42.102.25 16:49
Deleted board member id 10 195.42.102.25 16:49
Deleted board member id 9 195.42.102.25 16:49
Deleted board member id 4 195.42.102.25 16:49
Deleted board member id 3 195.42.102.25 16:49
Deleted board member id 5 195.42.102.25 16:49
Deleted board member id 6 195.42.102.25 16:49
Deleted board member id 11 195.42.102.25 16:49
Deleted board member id 7 195.42.102.25 16:49
Deleted review id 2 195.42.102.25 16:49
Deleted review id 3 195.42.102.25 16:49
这持续了几页。它甚至没有显示 195.42.102.25 登录!上次它发生在 195.128.18.19。他们的计算机如何在没有会话变量的情况下加载窗口?我的代码中是否存在我完全忽略的安全漏洞?!
关于这个问题的任何见解都会很棒。
谢谢,