Skip to content

Commit

Permalink
Fixing the regex in the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
reines committed Aug 9, 2010
1 parent 242b06b commit 7a28f7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function check_cookie(&$pun_user)
$cookie = array('user_id' => 1, 'password_hash' => 'Guest', 'expiration_time' => 0);

// If a cookie is set, we get the user_id and password hash from it
if (isset($_COOKIE[$cookie_name]) && preg_match('/a:3:{i:0;s:[\d]+:"([\d]+)";i:1;s:[\d]+:"([0-9a-f]+)";i:2;i:([\d]+);};/', $_COOKIE[$cookie_name], $matches))
if (isset($_COOKIE[$cookie_name]) && preg_match('/a:3:{i:0;s:\d+:"(\d+)";i:1;s:\d+:"([0-9a-f]+)";i:2;i:(\d+);}/', $_COOKIE[$cookie_name], $matches))
list(, $cookie['user_id'], $cookie['password_hash'], $cookie['expiration_time']) = $matches;

if ($cookie['user_id'] > 1)
Expand Down

0 comments on commit 7a28f7a

Please sign in to comment.