Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent type in return #203

Closed
enricomv opened this issue Oct 18, 2023 · 2 comments
Closed

Inconsistent type in return #203

enricomv opened this issue Oct 18, 2023 · 2 comments

Comments

@enricomv
Copy link
Contributor

In our setup we do have a list of SP entityID in the excludeEntityIDs and the 'SSO' defined as 'true' in the AuthProc configuration.

When we login into one of excluded SP and then login into a SP that requires 2FA, the module raises the following exception

Backtrace:
1 www/_include.php:20 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: TypeError: Return value of SimpleSAML\Module\privacyidea\Auth\Utils::checkForValidSSO() must be of the type boolean, null returned
Backtrace:
6 modules/privacyidea/lib/Auth/Utils.php:209 (SimpleSAML\Module\privacyidea\Auth\Utils::checkForValidSSO)
5 modules/privacyidea/lib/Auth/Process/PrivacyideaAuthProc.php:99 (SimpleSAML\Module\privacyidea\Auth\Process\PrivacyideaAuthProc::process)
4 lib/SimpleSAML/Auth/ProcessingChain.php:210 (SimpleSAML\Auth\ProcessingChain::processState)
3 lib/SimpleSAML/IdP.php:335 (SimpleSAML\IdP::postAuth)
2 lib/SimpleSAML/IdP.php:420 (SimpleSAML\IdP::handleAuthenticationRequest)
1 modules/saml/lib/IdP/SAML2.php:498 (SimpleSAML\Module\saml\IdP\SAML2::receiveAuthnRequest)
0 www/saml2/idp/SSOService.php:26 (N/A)

It seems that the function

public static function checkForValidSSO(array $state): bool

returns a null instead of false due to the line

return $session->getData('privacyidea:privacyidea', '2FA-success');

Thanks in advance for support

@nilsbehlen
Copy link
Member

Hi, please check v3.1.2, that should fix it.

@enricomv
Copy link
Contributor Author

It works! Thanks a lot for rapid fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants