From 9ab4622b6756e245776ffef830384d2a0178f2f0 Mon Sep 17 00:00:00 2001 From: cypherbits Date: Mon, 11 May 2020 18:24:25 +0200 Subject: [PATCH] If encryption is enabled, check the PHP version is at least 7.2 --- chat.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chat.php b/chat.php index d5e5c25..d18ce10 100644 --- a/chat.php +++ b/chat.php @@ -4229,6 +4229,9 @@ function load_config(){ define('COOKIENAME', PREFIX . 'chat_session'); // Cookie name storing the session information define('LANG', 'en'); // Default language 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 if (strlen(ENCRYPTKEY_PASS) !== SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES){ define('ENCRYPTKEY', substr(hash("sha512/256",ENCRYPTKEY_PASS),0, SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES));