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

From: Date: Mon, 21 Dec 2015 20:16:42 +0000
Subject: Bug #71186 [NEW]: session.hash_function - algorithm changes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198110@lists.php.net to get a copy of this message
From:             akauffman at ne4u dot com
Operating system: Ubuntu 14.04 LTS
PHP version:      7.0.1
Package:          Session related
Bug Type:         Bug
Bug description:session.hash_function - algorithm changes

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 bug report at https://bugs.php.net/bug.php?id=71186&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71186&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71186&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71186&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71186&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71186&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71186&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71186&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71186&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71186&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71186&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71186&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71186&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71186&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71186&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71186&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71186&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71186&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71186&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71186&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71186&r=mysqlcfg



Thread (12 messages)

« previous php.bugs (#198110) next »