Bug #71186 [Asn->Fbk]: session.hash_function - algorithm changes
| From: | yohgaki@php.net | Date: | Tue, 29 Dec 2015 22:31:06 +0000 |
| Subject: | Bug #71186 [Asn->Fbk]: session.hash_function - algorithm changes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198293@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: Assigned
+Status: Feedback
Type: Bug
Package: Session related
Operating System: any
PHP Version: 7.0.1
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
Could you paste the content of
ext/session/tests/bug71186.log
Your system uses this INI file
INI actual : /usr/local/php7/lib/php.ini
Could you pate the session section of this INI?
Previous Comments:
------------------------------------------------------------------------
[2015-12-22 15:50:29] akauffman at ne4u dot com
Related To: Bug #71186
------------------------------------------------------------------------
[2015-12-22 15:50:29] akauffman at ne4u dot com
Related To: Bug #71186
------------------------------------------------------------------------
[2015-12-22 15:50:28] akauffman at ne4u dot com
I had to add this to the test script:
session.save_path=/tmp
./run-tests.php -v ext/session/tests/bug71186.phpt
=====================================================================
PHP : /usr/local/bin/php
PHP_SAPI : cli
PHP_VERSION : 7.0.1
ZEND_VERSION: 3.0.0
PHP_OS : Linux - Linux waf1 3.19.0-41-generic #46~14.04.2-Ubuntu SMP Tue Dec 8 17:46:10 UTC
2015 x86_64
INI actual : /usr/local/php7/lib/php.ini
More .INIs : /usr/local/php7/etc/conf.d/modules.ini
CWD : /root/php-7-debian/php-src
Extra dirs :
VALGRIND : Not used
=====================================================================
Running selected tests.
=================
TEST /root/php-7-debian/php-src/ext/session/tests/bug71186.phpt
TEST 1/1 [ext/session/tests/bug71186.phpt]
CONTENT_LENGTH =
CONTENT_TYPE =
PATH_TRANSLATED = /root/php-7-debian/php-src/ext/session/tests/bug71186.php
QUERY_STRING =
REDIRECT_STATUS = 1
REQUEST_METHOD = GET
SCRIPT_FILENAME = /root/php-7-debian/php-src/ext/session/tests/bug71186.php
HTTP_COOKIE =
COMMAND /usr/local/bin/php -d "output_handler=" -d "open_basedir=" -d
"safe_mode=0" -d "disable_functions=" -d "output_buffering=Off" -d
"error_reporting=32767" -d "display_errors=1" -d
"display_startup_errors=1" -d "log_errors=0" -d "html_errors=0" -d
"track_errors=1" -d "report_memleaks=1" -d "report_zend_debug=0" -d
"docref_root=" -d "docref_ext=.html" -d "error_prepend_string=" -d
"error_append_string=" -d "auto_prepend_file=" -d "auto_append_file="
-d "ignore_repeated_errors=0" -d "precision=14" -d "memory_limit=128M"
-d "log_errors_max_len=0" -d "opcache.fast_shutdown=0" -d
"opcache.file_update_protection=0" -d "session.auto_start=0" -d
"zlib.output_compression=Off" -d "mbstring.func_overload=0" -d
"session.hash_function=sha512" -d "session.save_path=/tmp" -d
"session.save_handler=files" -f
"/root/php-7-debian/php-src/ext/session/tests/bug71186.php" 2>&1
FAIL Bug #71186 session.hash_function - algorithm changes [ext/session/tests/bug71186.phpt]
=====================================================================
Number of tests : 1 1
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 1 (100.0%) (100.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 0 ( 0.0%) ( 0.0%)
---------------------------------------------------------------------
Time taken : 0 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #71186 session.hash_function - algorithm changes [ext/session/tests/bug71186.phpt]
=====================================================================
------------------------------------------------------------------------
[2015-12-22 07:24:06] yohgaki@php.net
Something wrong in bug system. Please disregard the last comment.
------------------------------------------------------------------------
[2015-12-22 07:22:32] yohgaki@php.net
3v4l does not support/allow to change session.use_strict_mode=1
https://3v4l.org/KD6I3
I cannot reproduce problem. Try this phpt file and see if you have problem.
You can run single test as follows from PHP source root.
./run-tests.php ext/session/tests/bug71186.phpt
===== test file - save this code as "ext/session/tests/bug71186.phpt" =====
--TEST--
Bug #71186 session.hash_function - algorithm changes
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.hash_function=sha512
session.save_handler=files
--FILE--
<?php
ob_start();
ini_set('session.use_strict_mode', 1);
session_start();
$orig = session_id();
session_regenerate_id();
$new = session_id();
var_dump(strlen($orig),strlen($new));
session_commit();
ini_set('session.hash_function','sha1');
session_id('invalid');
session_start();
$orig = session_id();
session_regenerate_id();
$new = session_id();
var_dump(strlen($orig),strlen($new));
?>
--EXPECT--
int(128)
int(128)
int(40)
int(40)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71186
--
Edit this bug report at https://bugs.php.net/bug.php?id=71186&edit=1