session.hash_function silently fallback to default md5
| Bug #65315 | session.hash_function silently fallback to default md5 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2013-07-23 13:57 UTC | Modified: | 2013-08-09 09:07 UTC |
|
||||||||||
| From: | nbari at dalmp dot com | Assigned: | yohgaki (profile) | |||||||||||
| Status: | Closed | Package: | Session related | |||||||||||
| PHP Version: | 5.4.17 | OS: | any | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2013-07-23 13:57 UTC] nbari at dalmp dot com
Description:
------------
session.hash_function not working when having the session and hash extension
compiled out of the core.
ini_set('session.hash_function', 'sha256') returns a session with md5 hash not
sha256
To fix this, php must be compiled using: --enable-hash and --enable-session
Test script:
---------------
<?php
ini_set('session.hash_function', 'sha256');
ini_set('session.hash_bits_per_character', 5);
session_start();
var_dump(session_id());
Expected result:
----------------
string(52) "qcpidhu1jabq225probhkmegnehkrp3fetpdvflumpfbdvo7gis0"
a session hashed with the specified algorithm, in this case 'sha256'
Actual result:
--------------
string(26) "h5rbp62tghln79n92cqicjmce5"
a session hashed with the md5 algo
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2013-07-26 00:27 UTC] yohgaki@php.net
-Type: Bug +Type: Documentation Problem
[2013-07-26 00:27 UTC] yohgaki@php.net
[2013-07-26 09:42 UTC] nbari at dalmp dot com
[2013-07-28 22:33 UTC] yohgaki@php.net
[2013-07-28 22:38 UTC] yohgaki@php.net
-Summary: session.hash_function always using md5 +Summary: session.hash_function silently fallback to default md5 -Status: Open +Status: Assigned -Type: Documentation Problem +Type: Bug -Operating System: FreeBSD +Operating System: any -Assigned To: +Assigned To: yohgaki
[2013-08-09 09:07 UTC] yohgaki@php.net