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

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=71186&edit=1

 ID:                 71186
 Updated by:         [email protected]
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.