Bug #71186 [Opn]: session.hash_function - algorithm changes

From: Date: Tue, 22 Dec 2015 06:01:40 +0000
Subject: Bug #71186 [Opn]: session.hash_function - algorithm changes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198125@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71186&edit=1

 ID:                 71186
 Updated by:         yohgaki@php.net
 Reported by:        akauffman at ne4u dot com
 Summary:            session.hash_function - algorithm changes
 Status:             Open
 Type:               Bug
 Package:            Session related
-Operating System:   Ubuntu 14.04 LTS
+Operating System:   any
 PHP Version:        7.0.1
-Assigned To:        
+Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

https://3v4l.org/hkZM7

It seems something wrong in hash function setting.


Previous Comments:
------------------------------------------------------------------------
[2015-12-21 20:16:36] akauffman at ne4u dot com

Description:
------------
Setting session.hash_function via php.ini does not remain consistent, it goes back to default
algorithm after session_regenerate_id().  You must use ini_set in the script for the hashing
algorithm to remain consistent.


BTW - This bug seems to have been reintroduced.

Test script:
---------------
<?php
//ini_set('session.hash_function','sha512');
session_start();
$orig = session_id();
session_regenerate_id();
$new = session_id();
echo("$orig <br> $new");
?>

Expected result:
----------------
Hashing algorithm remains sha512.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71186&edit=1


Thread (12 messages)

« previous php.bugs (#198125) next »