From 71c3f9f7c16690c0cbbe194ac80291b0c58491f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 1 Jun 2017 14:33:03 +0200 Subject: [PATCH] Fix check for phpseclib presence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The check here was reversed compared to other locations. Fixes #13308 Signed-off-by: Michal Čihař --- libraries/Util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Util.php b/libraries/Util.php index 42a4fb971c..ba7e8980cf 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -4882,7 +4882,7 @@ class Util public static function generateRandom($length) { $result = ''; - if (! function_exists('openssl_random_pseudo_bytes')) { + if (class_exists('phpseclib\\Crypt\\Random')) { $random_func = 'phpseclib\\Crypt\\Random::string'; } else { $random_func = 'openssl_random_pseudo_bytes';