Commit 07fe290b authored by Ad Schellevis's avatar Ad Schellevis

(Captiveportal, new) work in progress session/client restrictions

parent 7febe0a4
...@@ -174,8 +174,9 @@ class AccessController extends ApiControllerBase ...@@ -174,8 +174,9 @@ class AccessController extends ApiControllerBase
'json' 'json'
) )
); );
$CPsession = json_decode($CPsession, true);
// push session restrictions, if they apply // push session restrictions, if they apply
if (array_key_exists('sessionId', $CPsession) && $authServer != null) { if ($CPsession != null && array_key_exists('sessionId', $CPsession) && $authServer != null) {
$authProps = $authServer->getLastAuthProperties(); $authProps = $authServer->getLastAuthProperties();
// when adding more client/session restrictions, extend next code // when adding more client/session restrictions, extend next code
// (currently only time is restricted) // (currently only time is restricted)
...@@ -189,7 +190,6 @@ class AccessController extends ApiControllerBase ...@@ -189,7 +190,6 @@ class AccessController extends ApiControllerBase
); );
} }
} }
$CPsession = json_decode($CPsession, true);
if ($CPsession != null) { if ($CPsession != null) {
// only return session if configd return a valid json response, otherwise fallback to // only return session if configd return a valid json response, otherwise fallback to
// returning "UNKNOWN" // returning "UNKNOWN"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment