While checking my log entries yesterday, I spotted this PHP error:

Duplicate entry 'b1cc73625bfc21b3b6c11188ecfbc384' for key 1 query: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES ('b1cc73625bfc21b3b6c11188ecfbc384', 0, 0, '81.99.70.60', '', 1208894273) in /home/includes/database.mysql.inc on line 155.

Is that someone trying to hack my Drupal site? I'm not an expert, but, is it trying to insert the UID 1 into the session?

Any security gurus out there?

Comments

Designer Dude’s picture

I don't know if that is a hacker trying to get in, but, is there a way that you can setup watchdog to send email alerts to the site admin when stuff like this happens?

ceejayoz’s picture

No, it's not trying to insert UID 1 into the session.

See where it says INSERT INTO sessions(sid, uid, ...) VALUES ('b1cc...', 0, ...)? That means it's trying to insert a session with uid of 0 - an anonymous user session, in other words. The "key 1" part just means the first key was what conflicted - that being the sid, or session id.

Basically, it tried inserting an anonymous user's session when that session had already been logged. Nothing to worry about security-wise.