Skip to content

PHP utility class for safeguarding against session hijack attempts

Notifications You must be signed in to change notification settings

CVM/Session-Security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Session Security Class

Usage

Include the file before all other code (or make available to your custom autoload). You can then protect your sessions with:

new Session_Security;

The object stores the fingerprint information in the session under key "fingerprint". You can specify a custom key to use like this:

new Session_Security('foo');

If a hijack attempt is detected, the would-be attacker is pushed to a new session. If you wish to take any action in the case of a hijack attempt, you can detect them like this:

$session = new Session_Security;
if ($session->isHijacked()) {
  // Do something
}

About

PHP utility class for safeguarding against session hijack attempts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages