xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.

Home Page:https://extensions.typo3.org/extension/ig_ldap_sso_auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LdapUtility::getFirstEntry() lacks error handling

masi opened this issue · comments

$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.