Fix IP checking in API middleware, closes #425

This commit is contained in:
Dane Everitt 2017-05-06 23:02:12 -04:00
parent 4306eaa00e
commit 5bdd75eb94
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}