php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51338
Patch apply_trans_sid.patch revision 2010-03-20 15:43 UTC by j dot jeising at gmail dot com

Patch apply_trans_sid.patch for Session related Bug #51338

Patch version 2010-03-20 15:43 UTC

Return to Bug #51338 | Download this patch
Patch Revisions:

Developer: j.jeising@gmail.com

--- session_5_3_latest.c	2010-03-12 11:28:59.000000000 +0100
+++ session_fix.c	2010-03-20 16:40:52.000000000 +0100
@@ -1391,6 +1391,10 @@
 			PS(apply_trans_sid) = 0;
 			PS(send_cookie) = 0;
 			PS(define_sid) = 0;
+		} else {
+			if (PS(use_only_cookies)) {
+				PS(apply_trans_sid) = 0;
+			}
 		}
 
 		if (!PS(use_only_cookies) && !PS(id) &&
@@ -1445,7 +1449,7 @@
 		efree(PS(id));
 		PS(id) = NULL;
 		PS(send_cookie) = 1;
-		if (PS(use_trans_sid)) {
+		if (PS(use_trans_sid) && !PS(use_only_cookies)) {
 			PS(apply_trans_sid) = 1;
 		}
 	}
@@ -1453,7 +1457,7 @@
 	php_session_initialize(TSRMLS_C);
 
 	if (!PS(use_cookies) && PS(send_cookie)) {
-		if (PS(use_trans_sid)) {
+		if (PS(use_trans_sid) && !PS(use_only_cookies)) {
 			PS(apply_trans_sid) = 1;
 		}
 		PS(send_cookie) = 0;
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 25 07:02:14 2014 UTC