X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=session.php;h=75508c026be78ef4d20d83f4ac76b7ec16ffc6da;hb=912bdab05d6262ab07e7ea6664192f97239db3e1;hp=d75e07e13509f98c87f02310b3a109870df2a263;hpb=25ae73baa4024c9677a412adf6bbc5ac2e56577a;p=wfpl.git diff --git a/session.php b/session.php index d75e07e..75508c0 100644 --- a/session.php +++ b/session.php @@ -1,19 +1,9 @@ . +# This program is in the public domain within the United States. Additionally, +# we waive copyright and related rights in the work worldwide through the CC0 +# 1.0 Universal public domain dedication, which can be found at +# http://creativecommons.org/publicdomain/zero/1.0/ # The functions in this file assume that you have this database table: @@ -149,7 +139,7 @@ function session_exists() { return false; } - $session_key = ereg_replace('[^a-zA-Z0-9]', '', $_COOKIE['session_key']); + $session_key = preg_replace('|[^a-z0-9]|i', '', $_COOKIE['session_key']); if(!strlen($session_key) == 16) { return false;