If encryption is enabled, check the PHP version is at least 7.2
This commit is contained in:
3
chat.php
3
chat.php
@ -4229,6 +4229,9 @@ function load_config(){
|
|||||||
define('COOKIENAME', PREFIX . 'chat_session'); // Cookie name storing the session information
|
define('COOKIENAME', PREFIX . 'chat_session'); // Cookie name storing the session information
|
||||||
define('LANG', 'en'); // Default language
|
define('LANG', 'en'); // Default language
|
||||||
if (MSGENCRYPTED){
|
if (MSGENCRYPTED){
|
||||||
|
if (version_compare(PHP_VERSION, '7.2.0') < 0) {
|
||||||
|
die("You need at least PHP >= 7.2.x");
|
||||||
|
}
|
||||||
//Do not touch: Compute real keys needed by encryption functions
|
//Do not touch: Compute real keys needed by encryption functions
|
||||||
if (strlen(ENCRYPTKEY_PASS) !== SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES){
|
if (strlen(ENCRYPTKEY_PASS) !== SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES){
|
||||||
define('ENCRYPTKEY', substr(hash("sha512/256",ENCRYPTKEY_PASS),0, SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES));
|
define('ENCRYPTKEY', substr(hash("sha512/256",ENCRYPTKEY_PASS),0, SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES));
|
||||||
|
Reference in New Issue
Block a user