francoisjacquet / rosariosis

RosarioSIS Student Information System for school management.
https://www.rosariosis.org
GNU General Public License v2.0
506 stars 347 forks source link

Password reset time mismatch #197

Closed Calculagator closed 7 years ago

Calculagator commented 7 years ago

The time format used to generate the emailed hash for password resets leaves off trailing 0's in the hours. PostgreSQL maintains that 0. This results in hashes not matching any time the last_login gets set to before 12:00. The code used (PasswordReset.php line 377) $last_login = date( 'Y-m-d G:i:s', time() + 7200 ); The 'G' should be changed to 'H' to preserve the trailing 0's $last_login = date( 'Y-m-d H:i:s', time() + 7200 );

francoisjacquet commented 7 years ago

Hello @Claculagator

Thank you for reporting the password reset issue. Would you mind sending a pull request to fix the bug?

Thank you.