Reset password does not work

When I click on “forgot password” and type a valid email, the system gives an error with the following message: “Email address not provided.” . I’ve tested with different emails and the same error occurs.
Gibbon Versão v24.0.01
PHP Versão 8.1.8
MySQL Versão 10.6.5

Thanks,
Alessandra, from Brazil.


When I put the administrator’s email, another error occurs as shown below.

Hi Alessandra. That is odd, I’ve just tested it locally and it seems to be working. The final screenshot with an error might give a clue as to what the previous issue was. Can you check your system PHP error log, as the Oh No message generally means a PHP error has been captured and recorded in the logs.

Thanks!

The messages below are from the request.log and error.log files

==> requests.log <==

==> error.log <==
[Tue Jan 10 17:52:11.185656 2023] [proxy_fcgi:error] [pid 1438246] [client 172.22.24.154:64477] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught ValueError: Unknown format specifier “S” in /var/www/html/espsc.com/sigasformacaotecnica.com/passwordResetProcess.php:109
Stack trace:
#0 /var/www/html/espsc.com/sigasformacaotecnica.com/passwordResetProcess.php(109): sprintf()
#1 {main}
thrown in /var/www/html/espsc.com/sigasformacaotecnica.com/passwordResetProcess.php on line 109’, referer: https://sigasformacaotecnica.espsc.saude.sc.gov.br/index.php?q=passwordReset.php

==> requests.log <==
172.22.24.154 - - [10/Jan/2023:17:52:11 -0300] “POST /passwordResetProcess.php?step=1 HTTP/1.1” 500 3118 “https://sigasformacaotecnica.espsc.saude.sc.gov.br/index.php?q=passwordReset.php” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36”

we put a comment on line 109 and it worked:

//$body = sprintf(__(‘A password reset request has been initiated for account %1$s, which is registered to this email address.%2$sIf you did not initiate this request, please ignore this email.%2$sIf you do wish to reset your password, please use the link below to access the reset form:%2$s%3$s%2$s%4$s’), $username, "

", ‘’, ‘’);

The problem is the space between the words: “%2$sIf”. The correct is “%2$s If”
We fixed it and now it’s working.

Thanks,
Alessandra

Hi Alessandra, thanks for sharing your solution, great to hear you got it working. My apologies for the delay in a response, it’s been busy on this end getting v25 ready for the release. It’s odd that “%2$sIf” would cause an error on your system but hasn’t caused an error on other systems. Can you let me know which version of PHP you’re running, maybe it’s something that has changed in newer versions, in which case we’ll want to test for the release. Also, were you using any other languages when accessing this page? Sometimes a translator may inadvertently change the string placeholders in a string which can cause it to fail to work as expected.

Thanks!

Gibbon Versão v24.0.01
PHP Versão 8.1.8
MySQL Versão 10.6.5

I´m using Portuguese.

Thanks

Alessandra fixed a password reset error in Gibbon due to a space issue in PHP.