Created
July 31, 2013 19:19
-
-
Save ilkkao/6125242 to your computer and use it in GitHub Desktop.
Test one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!defined($sec_cookie) || !defined($userid) || !exists($users{$userid}) || | |
!exists($users{$userid}{"secret_cookie"}) || | |
$sec_cookie ne $users{$userid}{"secret_cookie"} || | |
$users{$userid}{"secret_cookie"} == 0) | |
{ | |
my $expected = "undef"; | |
$expected = $users{$userid}{"secret_cookie"} if (exists($users{$userid}{"secret_cookie"})); | |
$sec_cookie = "undef" if (!defined($sec_cookie)); | |
$userid = "undef" if (!defined($userid)); | |
#Send imposter away. reply_send is used not to distrubt legimate user session | |
&reply_send(0, $socket, 0, $jsonid, "DIE Security violation!"); | |
dprint(1, 0, "WWW: Mismatch: " . $expected . | |
" != $sec_cookie , userid: $userid"); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment