Fix IP checking in API middleware, closes #425
This commit is contained in:
parent
4306eaa00e
commit
5bdd75eb94
|
@ -148,7 +148,7 @@ class HMACAuthorization
|
|||
protected function validateIPAccess()
|
||||
{
|
||||
if (! is_null($this->key()->allowed_ips)) {
|
||||
foreach ($this->key()->allowed_ips as $ip) {
|
||||
foreach (json_decode($this->key()->allowed_ips) as $ip) {
|
||||
if (Range::parse($ip)->contains(new IP($this->request()->ip()))) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue