[SECURITY] Fix IP-based rate-limiting

Co-authored-by: Celestine <34442450+rem-pai@users.noreply.github.com>
This commit is contained in:
Alma Armas 2021-01-07 16:23:24 +00:00
parent 343315a858
commit aed731a59f

View file

@ -20,7 +20,7 @@ class IPs
if(!$bip)
throw new \UnexpectedValueException("Malformed IP address");
$res = $this->ips->get($bip);
$res = $this->ips->where("ip", $bip)->fetch();
if(!$res) {
$res = new IP;
$res->setIp($ip);