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

Ignore $supported_extensions when it's empty #230

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

valeriop
Copy link

This is a LDAP Authentication Plugin on PHP8 + SAMBA4 AD simple fix.

Symptoms:
PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/include/Net/LDAP2.php:640
Stack trace:
#0 /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/include/Net/LDAP2.php(640): in_array()
#1 /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/include/Net/LDAP2.php(444): Net_LDAP2->startTLS()
#2 /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/include/Net/LDAP2.php(339): Net_LDAP2->performConnect()
#3 /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/authentication.php(158): Net_LDAP2->bind()
#4 /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/authentication.php(191): LDAPAuthentication->getConnection()
#5 /var/www/osticket/web.1.16.git/include/plugins/auth-ldap/authentication.php(479): LDAPAuthentication->authenticate()
#6 /var/www/osticket/web.1.16.git/include/class.auth.php(249): ClientLDAPAuthentication->authenticate()
#7 /var/www/osticket/web.1.16.git/login.php(51): AuthenticationBackend::process()

During "auth-ldap" initialization startTLS() tries to get "supportedExtensions" from rootDSE.
SAMBA AD LDAP has "supportedCapabilities" and "supportedControl" entries but no "supportedExtensions".
$rootDSE->getValue('supportedExtension') return an empty string (could it be better to return an empty array ?)
PHP 5.x and PHP 7.x give warnings
PHP 8 (osTicket 1.16 requirement) gives fatal error.

@JediKev
Copy link
Contributor

JediKev commented Jun 14, 2022

@valeriop

Just a heads up that the IMAP/POP Authentication plugin you made is about to be fully obsolete. Modern Authentication is already forced for Google users and MS users will be forced to use the same in October. This means basic authentication (username/password) will not work at all.

Cheers.

@valeriop
Copy link
Author

:-) oops
My pull request was for auth-ldap plugin only.
After that I thought that someone else could be interested in an old plugin I made.

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

Successfully merging this pull request may close these issues.

2 participants