svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_3/ext/session/mod_user.c PHP_5_3/ext/session/tests/bug60860.phpt PHP_5_4/NEWS
PHP_5_4/ext/session/mod_user.c PHP_5_4/ext/session/tests/bug60860.phpt
| From: | Felipe Pena | Date: | Sat, 28 Jan 2012 21:02:09 +0000 |
| Subject: | svn: /php/php-src/branches/ PHP_5_3/NEWS PHP_5_3/ext/session/mod_user.c PHP_5_3/ext/session/tests/bug60860.phpt PHP_5_4/NEWS PHP_5_4/ext/session/mod_user.c PHP_5_4/ext/session/tests/bug60860.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67562@lists.php.net to get a copy of this message | ||
felipe Sat, 28 Jan 2012 21:02:09 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=322909
Log:
- Fixed bug #60860 (session.save_handler=user without defined function core dumps)
Bug: https://bugs.php.net/60860 (Assigned)
session.save_handler=user without defined function core dumps
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/session/mod_user.c
A php/php-src/branches/PHP_5_3/ext/session/tests/bug60860.phpt
U php/php-src/branches/PHP_5_4/NEWS
U php/php-src/branches/PHP_5_4/ext/session/mod_user.c
A php/php-src/branches/PHP_5_4/ext/session/tests/bug60860.phpt
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2012-01-28 20:07:31 UTC (rev 322908)
+++ php/php-src/branches/PHP_5_3/NEWS 2012-01-28 21:02:09 UTC (rev 322909)
@@ -1,6 +1,9 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ?? 2012, PHP 5.3.10
+- Session:
+ . Fixed bug #60860 (session.save_handler=user without defined function core
+ dumps). (Felipe)
- Core:
. Fixed bug #60227 (header() cannot detect the multi-line header with CR).
Modified: php/php-src/branches/PHP_5_3/ext/session/mod_user.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/mod_user.c 2012-01-28 20:07:31 UTC (rev 322908)
+++ php/php-src/branches/PHP_5_3/ext/session/mod_user.c 2012-01-28 21:02:09 UTC (rev 322909)
@@ -86,6 +86,13 @@
zval *args[2];
static char dummy = 0;
STDVARS1;
+
+ if (PSF(open) == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "user session functions not defined");
+
+ return FAILURE;
+ }
SESS_ZVAL_STRING((char*)save_path, args[0]);
SESS_ZVAL_STRING((char*)session_name, args[1]);
Added: php/php-src/branches/PHP_5_3/ext/session/tests/bug60860.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/session/tests/bug60860.phpt (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/session/tests/bug60860.phpt 2012-01-28 21:02:09 UTC (rev
322909)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60860 (session.save_handler=user without defined function core dumps)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=user
+--FILE--
+<?php
+
+session_start();
+echo "ok\n";
+
+?>
+--EXPECTF--
+Warning: session_start(): user session functions not defined in %s on line 3
+
+Fatal error: session_start(): Failed to initialize storage module: user (path: ) in %s on line 3
Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS 2012-01-28 20:07:31 UTC (rev 322908)
+++ php/php-src/branches/PHP_5_4/NEWS 2012-01-28 21:02:09 UTC (rev 322909)
@@ -8,6 +8,10 @@
- OpenSSL:
. Fix possible attack in SSL sockets with SSL 3.0 / TLS 1.0.
CVE-2011-3389. (Scott)
+
+- Session:
+ . Fixed bug #60860 (session.save_handler=user without defined function core
+ dumps). (Felipe)
19 Jan 2012, PHP 5.4.0 RC6
Modified: php/php-src/branches/PHP_5_4/ext/session/mod_user.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/session/mod_user.c 2012-01-28 20:07:31 UTC (rev 322908)
+++ php/php-src/branches/PHP_5_4/ext/session/mod_user.c 2012-01-28 21:02:09 UTC (rev 322909)
@@ -80,6 +80,13 @@
{
zval *args[2];
STDVARS;
+
+ if (PSF(open) == NULL) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "user session functions not defined");
+
+ return FAILURE;
+ }
SESS_ZVAL_STRING((char*)save_path, args[0]);
SESS_ZVAL_STRING((char*)session_name, args[1]);
Added: php/php-src/branches/PHP_5_4/ext/session/tests/bug60860.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/session/tests/bug60860.phpt (rev 0)
+++ php/php-src/branches/PHP_5_4/ext/session/tests/bug60860.phpt 2012-01-28 21:02:09 UTC (rev
322909)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60860 (session.save_handler=user without defined function core dumps)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.save_handler=user
+--FILE--
+<?php
+
+session_start();
+echo "ok\n";
+
+?>
+--EXPECTF--
+Warning: session_start(): user session functions not defined in %s on line 3
+
+Fatal error: session_start(): Failed to initialize storage module: user (path: ) in %s on line 3