cvs: php4 /ext/session session.c
| From: | Sascha Schumann | Date: | Wed, 13 Mar 2002 13:08:49 +0000 |
| Subject: | cvs: php4 /ext/session session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10063@lists.php.net to get a copy of this message | ||
sas Wed Mar 13 08:08:49 2002 EDT
Modified files:
/php4/ext/session session.c
Log:
Because of the feature "don't try to send a cookie, if the sid
was contained in get/post variables" (which I still am not convinced
of completely), we need a separate variable which determines whether
to define SID in the event that a cookie was not sent.
Noticed by: Matt Allen
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.293 php4/ext/session/session.c:1.294
--- php4/ext/session/session.c:1.293 Fri Mar 8 19:24:42 2002
+++ php4/ext/session/session.c Wed Mar 13 08:08:49 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.293 2002/03/09 00:24:42 sniper Exp $ */
+/* $Id: session.c,v 1.294 2002/03/13 13:08:49 sas Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -833,6 +833,7 @@
zval **data;
char *p;
int send_cookie = 1;
+ int define_sid = 1;
int module_number = PS(module_number);
int nrand;
int lensess;
@@ -859,6 +860,7 @@
PPID2SID;
PS(apply_trans_sid) = 0;
send_cookie = 0;
+ define_sid = 0;
}
if (!PS(id) &&
@@ -930,8 +932,7 @@
}
- /* define SID always, if the client did not send a cookie */
- if (send_cookie) {
+ if (define_sid) {
smart_str var = {0};
smart_str_appends(&var, PS(session_name));