ltb-project / self-service-password

Web interface to change and reset password in an LDAP directory
https://self-service-password.readthedocs.io/en/latest/
GNU General Public License v3.0
1.15k stars 325 forks source link

ssp 1.6 Newbie - Multiple Issues #960

Open debio-ndtc opened 1 month ago

debio-ndtc commented 1 month ago

RHEL8 php 8.2.22 php-Smarty 3.1.48 ssp 1.6

We currently have an older version of ssp running on a CentOS7 server. Trying to install and utilize the new version on the new server and am running into a multitude of issues.

I am able to access the index.php page in a browser. I can purposely enter the username/pw incorrectly and get the feedback of username and/or password incorrect. And see this in the /var/log/php-fpm/www-error.log: [07-Aug-2024 16:41:20 UTC] Module Zxcvbn successfully loaded [07-Aug-2024 16:41:20 UTC] LDAP - User it-test not found

When I enter the username and password correctly, enter a new password, I hit submit and am served a blank page with the url of domain.com/ssp-xxx/#

/var/log/php-fpm/www-error.log: [07-Aug-2024 16:45:43 UTC] Module Zxcvbn successfully loaded [07-Aug-2024 16:45:43 UTC] PHP Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, string given in /usr/share/self-service-password/vendor/ltb-project/ldap/src/Ltb/AttributeValue.php:45 Stack trace:

0 /usr/share/self-service-password/vendor/ltb-project/ldap/src/Ltb/AttributeValue.php(45): sizeof()

1 /usr/share/self-service-password/vendor/ltb-project/ldap/src/Ltb/AttributeValue.php(65): Ltb\AttributeValue::ldap_get_first_available_value()

2 /usr/share/self-service-password/htdocs/change.php(96): Ltb\AttributeValue::ldap_get_mail_for_notification()

3 /usr/share/self-service-password/htdocs/index.php(195): require_once('...')

4 {main}

thrown in /usr/share/self-service-password/vendor/ltb-project/ldap/src/Ltb/AttributeValue.php on line 45

These are the lines in question: /usr/share/self-service-password/vendor/ltb-project/ldap/src/Ltb/AttributeValue.php:45 for ($i = 0; $i < sizeof($attributes); $i++) {

/usr/share/self-service-password/vendor/ltb-project/ldap/src/Ltb/AttributeValue.php(65): Ltb\AttributeValue::ldap_get_first_available_value() $mailValue = \Ltb\AttributeValue::ldap_get_first_available_value($ldap, $entry, $mail_attributes);

/usr/share/self-service-password/htdocs/change.php(96): Ltb\AttributeValue::ldap_get_mail_for_notification() $mail = \Ltb\AttributeValue::ldap_get_mail_for_notification($ldap, $entry, $mail_attributes);

/usr/share/self-service-password/htdocs/index.php(195): require_once('...') if (file_exists($action.".php")) { require_once($action.".php"); }

I do see an entry in the ldap server that that user connected to the ldap server, but that is it.

The password is NOT changed.

It "appears" that I am connecting to the LDAP server, but I must have some config wrong, both to the ldap server and the ssp, as it doesn't load an error or a success page.

I have read every issue here, googled to no end and have tried a multitude of changes that have not resulted in any forward progress. I am not a php expert so am struggling for sure.

On the old server/version of ssp, when you click submit, the url that is returned is domain.com/ssp-xxx/index.php#

Any thoughts or suggestions welcome.

coudot commented 3 weeks ago

It's better to use mailing list for such problems.

Be sure to readd all upgrade notes: https://self-service-password.readthedocs.io/en/stable/upgrade.html

Specially: https://self-service-password.readthedocs.io/en/stable/upgrade.html#multiple-attributes-for-mail-and-mobile