in reply to Tracking users with cookies
For example, consider the following mock-up code based on the snippet provided and some of my code that uses Apache::Session:
my %session; eval { tie %session, 'Apache::Session::MySQL', $cookie, { ... } } if ($@) { # error occurred in session information retrieval ? } if (exists $session{$cookie}) { # ... user session is still valid ... } else { # ... user session no longer valid ... }
It may be worthwhile having a look at Essential CGI Security Practices and Securing CGI scripts - In short, code defensively and never trust anything sent from the browser.
|
|---|