diff options
author | Yorhel <git@yorhel.nl> | 2014-08-29 11:50:41 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-08-29 11:50:41 +0200 |
commit | 1cf4252f2d313bc1e3f460a1d379a49b751d1170 (patch) | |
tree | 4385788e5553fe7376e4063961e8c7a9cbce7663 /lib/VNDB/Util/Auth.pm | |
parent | 9a1bd46a568094ff62cfc85bc488b116042718b8 (diff) |
API: Make sure to honor the new login throttle
Diffstat (limited to 'lib/VNDB/Util/Auth.pm')
-rw-r--r-- | lib/VNDB/Util/Auth.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index a1fa9b4d..89cbd215 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -165,7 +165,7 @@ sub authGetCode { my $self = shift; my $id = shift; my $time = (shift || time)/3600; # accuracy of an hour - my $uid = encode_utf8($self->{_auth} ? $self->{_auth}{id} : $self->normIP()); + my $uid = encode_utf8($self->{_auth} ? $self->{_auth}{id} : norm_ip($self->reqIP())); return lc substr sha1_hex($self->{form_salt} . $uid . encode_utf8($id||'') . pack('N', int $time)), 0, 16; } |