summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-10-27 16:37:25 +0200
committerAndrey Andreev <narf@devilix.net>2016-10-27 16:37:25 +0200
commitdbc025b6c2c9b0b085bb79dc126bc58fb2a8c2a8 (patch)
tree91ef53e2506991fbc42f5080ec2393cd660af4f8 /system/libraries/Session/Session.php
parent0c23e9122666a30797079bea9415da135d4f7e12 (diff)
[ci skip] Another attempt at #4874
Diffstat (limited to 'system/libraries/Session/Session.php')
-rw-r--r--system/libraries/Session/Session.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index ea7853108..01989d2d7 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -348,8 +348,9 @@ class CI_Session {
if ($hash_function !== '1')
{
ini_set('session.hash_function', 1);
- $bits = 160;
}
+
+ $bits = 160;
}
elseif ( ! in_array($hash_function, hash_algos(), TRUE))
{
@@ -363,7 +364,7 @@ class CI_Session {
}
$bits_per_character = (int) ini_get('session.hash_bits_per_character');
- $sid_length = $bits * $bits_per_character;
+ $sid_length = (int) ceil($bits / $bits_per_character);
}
else
{