Oomaxpro / moodle-auth_cognito

OOMAX Pro Authentication for Moodle LMS
https://oomaxpro.com/
0 stars 0 forks source link

Property doesn't exist sanity check fault (auth.php#L53) #3

Closed dustinbrisebois closed 1 month ago

dustinbrisebois commented 5 months ago

https://github.com/Oomaxpro/moodle-auth_cognito/blob/main/auth.php#L53

if (property_exists($SESSION, 'logout')) { $this->logouturl = $SESSION->logout; }

Doesn't check if the $SESSION is not empty or not before the logout check is run. In cases where no SESSION has been generated yet this will throw a property doesn't exist fault.

if (!is_null($SESSION) && property_exists($SESSION, 'logout')) { $this->logouturl = $SESSION->logout; }

Fixes the sanity fault.

SwayzeD commented 1 month ago

Fixed. Thanks