From 26086981a24e72f283da38dbdb992f27b4135a80 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 08 Sep 2015 11:38:19 -0400
Subject: [PATCH] Improve randomness of security tokens (#1490529)

---
 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 dd0ff72..b0bfeef 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -430,7 +430,7 @@
      */
     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)));

--
Gitblit v1.9.1