You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't configure any LDAP backend on Nextcloud 20.0.2:
sudo -u www-data /usr/bin/php occ ldap_contacts:add --interactive $TEST
Address book display name: TEST
An unhandled exception has been thrown:
TypeError: Argument 3 passed to OCA\LDAPContactsBackend\Service\ConnectionImporter::extractTlsMode() must be of the type string, int given, called in /var/www/html/apps/ldap_contacts_backend/lib/Service/ConnectionImporter.php on line 71 and defined in /var/www/html/apps/ldap_contacts_backend/lib/Service/ConnectionImporter.php:84
Stack trace:
#0 /var/www/html/apps/ldap_contacts_backend/lib/Service/ConnectionImporter.php(71): OCA\LDAPContactsBackend\Service\ConnectionImporter->extractTlsMode()
#1 /var/www/html/apps/ldap_contacts_backend/lib/Command/Add.php(322): OCA\LDAPContactsBackend\Service\ConnectionImporter->getAvailableConnections()
#2 /var/www/html/apps/ldap_contacts_backend/lib/Command/Add.php(158): OCA\LDAPContactsBackend\Command\Add->askImport()
#3 /var/www/html/3rdparty/symfony/console/Command/Command.php(240): OCA\LDAPContactsBackend\Command\Add->interact()
#4 /var/www/html/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#5 /var/www/html/3rdparty/symfony/console/Application.php(1000): OC\Core\Command\Base->run()
#6 /var/www/html/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand()
#7 /var/www/html/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun()
#8 /var/www/html/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#9 /var/www/html/console.php(100): OC\Console\Application->run()
#10 /var/www/html/occ(11): require_once('/var/www/html/c...')
The text was updated successfully, but these errors were encountered:
In file ldap_contacts_backend/lib/Service/ConnectionImporter.php I added two "casts".
Line 51: ... (string) $c->ldapTLS ...
Line 71: ... (string) $c->ldapTLS ...
Which solved the problem.
I am not sure if this is the optimal solution.
I checked server/apps/user_ldap/lib/Configuration.php of the main nextcloud server code.
There it looks for me as if ldap_tls is defined implicit as an int and in function guessPortAndTLS the value is casted to "int".
Another solution would be to modify extractTlsMode to work with "int" instead of "string".
Line 84 in ldap_contacts_backend/lib/Service/ConnectionImporter.php:
protected function extractTlsMode(string $host, string $port, int $startTls): string {
if ($startTls === 1) {
I can't configure any LDAP backend on Nextcloud 20.0.2:
The text was updated successfully, but these errors were encountered: