Skip to content

Commit

Permalink
[ci skip] Another attempt at #4874
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Oct 27, 2016
1 parent 0c23e91 commit dbc025b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions system/libraries/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ protected function _configure_sid_length()
if ($hash_function !== '1')
{
ini_set('session.hash_function', 1);
$bits = 160;
}

$bits = 160;
}
elseif ( ! in_array($hash_function, hash_algos(), TRUE))
{
Expand All @@ -363,7 +364,7 @@ protected function _configure_sid_length()
}

$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
{
Expand Down

0 comments on commit dbc025b

Please sign in to comment.