diff options
author | Aleksander Machniak <alec@alec.pl> | 2015-09-08 18:38:19 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2015-09-08 18:38:19 +0300 |
commit | 26086981a24e72f283da38dbdb992f27b4135a80 (patch) | |
tree | a754310d1588e9d8736bd4317abee6fe1f648de3 /tests | |
parent | f75bc5c24b126a1de7b0f9e92f4453b642ae7227 (diff) |
Improve randomness of security tokens (#1490529)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Framework/Utils.php | 2 |
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))); |