ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/login.ext
(Generate patch)

Comparing deliantra/server/ext/login.ext (file contents):
Revision 1.117 by root, Fri Feb 3 03:01:44 2012 UTC vs.
Revision 1.118 by root, Thu Nov 8 00:16:07 2012 UTC

140} 140}
141 141
142sub compare_password($$) { 142sub compare_password($$) {
143 my ($pass, $token) = @_; 143 my ($pass, $token) = @_;
144 144
145 if ($token =~ /\!(.*)/) { 145 if ($token =~ /!!(.*)/) {
146 return +(substr $pass, 0, 8) eq pack "H*", $1;
147 } elsif ($token =~ /!(.*)/) {
146 return $pass eq pack "H*", $1; 148 return $pass eq pack "H*", $1;
147 } else { 149 } else {
148 return $token eq crypt $pass, $token; 150 return $token eq crypt $pass, $token;
149 } 151 }
150} 152}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines