summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Session')
-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
{