Fix IP checking in API middleware, closes #425
This commit is contained in:
parent
4306eaa00e
commit
5bdd75eb94
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ class HMACAuthorization
|
||||||
protected function validateIPAccess()
|
protected function validateIPAccess()
|
||||||
{
|
{
|
||||||
if (! is_null($this->key()->allowed_ips)) {
|
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()))) {
|
if (Range::parse($ip)->contains(new IP($this->request()->ip()))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue