openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit fd1b1b065be4ef60dd294f4f7e6aaa889bff486d
parent 1fde6c8796997e3ef842bf266af90799aed04e30
Author: Jan Dankert <develop@jandankert.de>
Date:   Wed,  7 Oct 2020 23:28:52 +0200

Fix: bindec() fails on PHP 7.4 if there a faulty bytes in a string.

Diffstat:
Mmodules/security/Password.class.php | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/security/Password.class.php b/modules/security/Password.class.php @@ -159,7 +159,8 @@ class Password */ static public function randomNumber( $bytesCount ) { - return bindec( Password::randomBytes($bytesCount) ); + // With '@' we reject the message "Invalid characters passed" since PHP 7.4 + return @bindec( Password::randomBytes($bytesCount) ); }