php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20961 session_decode causes the script to crash
Submitted: 2002-12-12 09:53 UTC Modified: 2003-01-02 18:47 UTC
From: mthornton at wei dot cc Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 4.2.3 OS: Linux/Windows
Private report: No CVE-ID: None
 [2002-12-12 09:53 UTC] mthornton at wei dot cc
function get_session_decode($sessStr) 
{
	if ($sessStr) {
		session_decode($sessStr);
		unset($sessStr);
		$vars = get_defined_vars();
	
		return $vars;
	} //if
} //func

The following function should return an array of session variables:

function get_session_decode($sessStr) 
{
	if ($sessStr) {
		session_decode($sessStr);
		unset($sessStr);
		$vars = get_defined_vars();
	
		return $vars;
	} //if
} //func

print_r(get_session_decode('TEST|s:7:"testing";'));

however session_decode always crashes when you pass it a valid session string. It does not crash if you pass it an invalid session string or an empty/false string. I tried using the function by it self, but it still crashes. No sessions where created at the time (which SHOULD NOT be needed).

If you call session_start() first, it does not crash, but does not set any variables.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-12 09:53 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-29 10:28 UTC] JeanFrederic at Loiseau dot org
I have the same issue, but under Windows XP.

I have tried Php version 4.3 (latest), but this issue still exist...

Is there a workaround ?

thanks in advance,

Jean-Frederic
 [2003-01-02 18:47 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC