diff options
author | Yorhel <git@yorhel.nl> | 2013-03-09 10:07:45 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2013-03-09 10:07:45 +0100 |
commit | f8b85e6d0aa29e6d670df9f19af07d4f4a6e29b2 (patch) | |
tree | 5204b264c5643b49e225b102b52d67f156c75b6e /lib/VNDB/DB | |
parent | a0772bdb64e779071f301315ca44857c73cdd8bb (diff) |
Allow only one account registration per /48 IPv6 block per day
I think this is the only thing necessary to add full IPv6 support to
VNDB. It's not actually necessary, but without this modification it will
become way too easy to flood the site with new accounts.
Diffstat (limited to 'lib/VNDB/DB')
-rw-r--r-- | lib/VNDB/DB/Users.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm index 88de4d96..0ca56780 100644 --- a/lib/VNDB/DB/Users.pm +++ b/lib/VNDB/DB/Users.pm @@ -42,7 +42,7 @@ sub dbUserGet { !$o{uid} && !$o{username} ? ( 'id > 0' => 1 ) : (), $o{ip} ? ( - 'ip = ?' => $o{ip} ) : (), + 'ip !s ?' => [ $o{ip} =~ /\// ? '<<' : '=', $o{ip} ] ) : (), $o{registered} ? ( 'registered > to_timestamp(?)' => $o{registered} ) : (), $o{search} ? ( |