summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Users.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2014-08-29 11:50:41 +0200
committerYorhel <git@yorhel.nl>2014-08-29 11:50:41 +0200
commit1cf4252f2d313bc1e3f460a1d379a49b751d1170 (patch)
tree4385788e5553fe7376e4063961e8c7a9cbce7663 /lib/VNDB/Handler/Users.pm
parent9a1bd46a568094ff62cfc85bc488b116042718b8 (diff)
API: Make sure to honor the new login throttle
Diffstat (limited to 'lib/VNDB/Handler/Users.pm')
-rw-r--r--lib/VNDB/Handler/Users.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm
index 78c4103d..680e50a0 100644
--- a/lib/VNDB/Handler/Users.pm
+++ b/lib/VNDB/Handler/Users.pm
@@ -140,7 +140,7 @@ sub login {
return $self->resRedirect('/') if $self->authInfo->{id};
- my $tm = $self->dbThrottleGet($self->normIP);
+ my $tm = $self->dbThrottleGet(norm_ip($self->reqIP));
if($tm-time() > $self->{login_throttle}[1]) {
$self->htmlHeader(title => mt '_login_title');
div class => 'mainbox';
@@ -167,7 +167,7 @@ sub login {
if(!$frm->{_err}) {
return if $self->authLogin($frm->{usrname}, $frm->{usrpass}, $ref);
$frm->{_err} = [ 'login_failed' ];
- $self->dbThrottleSet($self->normIP, $tm+$self->{login_throttle}[0]);
+ $self->dbThrottleSet(norm_ip($self->reqIP), $tm+$self->{login_throttle}[0]);
}
}