diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 91bd915d6..8586e6405 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -1160,7 +1160,7 @@ class rcube_utils $random = openssl_random_pseudo_bytes($length); - if ($random === false) { + if ($random === false && $length > 0) { throw new Exception("Failed to get random bytes"); }