我有一個地獄問題,我無法弄清楚我的生活。我爲客戶建立了一個超級簡單的CMS。 CMS的每個不同頁面都有幷包含名爲session.php的文件。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。他們如何在沒有會話變量的情況下加載窗口?我的代碼中是否有安全漏洞,我完全忽略了它?!
在這個問題上的任何洞察力將是非常棒的。
感謝,
什麼在你的「session.php」文件? – Arno 2010-01-06 09:17:58