Skip to content

Use of deprecated ldap_connect function break API authentication #421

@nrundle

Description

@nrundle

PHP 8.3.0 deprecated one of the ldap_connect functions.

8.3.0 | Calling ldap_connect() with separate hostname and port is now deprecated.

When attempting to use either Ldap auth or ActiveDirectory auth via the Web API, an error is returned:

Slim Application Error

The application could not run because of the following error:

Details

Code: 8192
Message: Usage of ldap_connect with two arguments is deprecated
File: /var/www/html/plugins/Authentication/Ldap/LDAP2.php
Line: 436

Trace

#0 [internal function]: Slim\Slim::handleErrors()
#1 /var/www/html/plugins/Authentication/Ldap/LDAP2.php(436): ldap_connect()
#2 /var/www/html/plugins/Authentication/Ldap/LDAP2.php(340): Net_LDAP2->performConnect()
#3 /var/www/html/plugins/Authentication/Ldap/LDAP2.php(208): Net_LDAP2->bind()
#4 /var/www/html/plugins/Authentication/Ldap/Ldap2Wrapper.php(35): Net_LDAP2::connect()
#5 /var/www/html/plugins/Authentication/Ldap/Ldap.php(111): Ldap2Wrapper->Connect()
#6 /var/www/html/lib/Application/Authentication/WebServiceAuthentication.php(53): Ldap->Validate()
#7 /var/www/html/WebServices/AuthenticationWebService.php(51): WebServiceAuthentication->Validate()
#8 [internal function]: AuthenticationWebService->Authenticate()
#9 /var/www/html/lib/external/Slim/Router.php(200): call_user_func_array()
#10 /var/www/html/lib/external/Slim/Slim.php(1218): Slim\Router->dispatch()
#11 /var/www/html/lib/external/Slim/Middleware/Flash.php(86): Slim\Slim->call()
#12 /var/www/html/lib/external/Slim/Middleware/MethodOverride.php(94): Slim\Middleware\Flash->call()
#13 /var/www/html/lib/external/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#14 /var/www/html/lib/external/Slim/Slim.php(1167): Slim\Middleware\PrettyExceptions->call()
#15 /var/www/html/Web/Services/index.php(70): Slim\Slim->run()
#16 {main} 

For some reason, logging in via the web GUI works just fine though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions