Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-09-08 18:38:19 +0300
committerAleksander Machniak <alec@alec.pl>2015-09-08 18:38:19 +0300
commit26086981a24e72f283da38dbdb992f27b4135a80 (patch)
treea754310d1588e9d8736bd4317abee6fe1f648de3 /tests
parentf75bc5c24b126a1de7b0f9e92f4453b642ae7227 (diff)
Improve randomness of security tokens (#1490529)
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/Utils.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index dd0ff72d8..b0bfeefa5 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -430,7 +430,7 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
*/
function test_random_bytes()
{
- $this->assertSame(15, strlen(rcube_utils::random_bytes(15)));
+ $this->assertRegexp('/^[a-zA-Z0-9]{15}$/', rcube_utils::random_bytes(15));
$this->assertSame(15, strlen(rcube_utils::random_bytes(15, true)));
$this->assertSame(1, strlen(rcube_utils::random_bytes(1)));
$this->assertSame(0, strlen(rcube_utils::random_bytes(0)));