xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.
https://extensions.typo3.org/extension/ig_ldap_sso_auth
27 stars 62 forks source link

LdapUtility::getFirstEntry() lacks error handling #150

Open masi opened 1 year ago

masi commented 1 year ago

$attributes = @ldap_get_attributes($this->connection, $this->firstResultEntry); may return FALSE on array. In this case the following foreach loop will trigger a warning/error.

In the flow of the code it may be the case that $this->firstResultEntry is FALSE. In other other parts of the code there is some protection: is_resource($this->firstResultEntry).

Sidenote: It is not clear to me why $this->status['get_first_entry']['status'] = ldap_error($this->connection); is executed as the very first statement in the function.