diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 3bb244079..c8f8c664f 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -1167,7 +1167,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"); }