1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 09:28:21 +02:00

MFB: Fixed bug #42869 (automatic session id insertion adds sessions id to

non-local forms)
This commit is contained in:
Ilia Alshanetsky
2007-10-10 00:36:25 +00:00
parent adda3af3cb
commit c6b8a40181
2 changed files with 647 additions and 589 deletions
File diff suppressed because it is too large Load Diff
+22 -11
View File
@@ -205,16 +205,29 @@ static void handle_form(STD_PARA)
if (ctx->form_app.len > 0) {
switch (ctx->tag.len) {
case sizeof("form") - 1:
if (!strncasecmp(ctx->tag.c, "form", sizeof("form") - 1)) {
doit = 1;
}
if (doit && ctx->val.c && ctx->lookup_data && *ctx->lookup_data) {
char *e, *p = zend_memnstr(ctx->val.c, "://", sizeof("://") - 1, ctx->val.c + ctx->val.len);
if (p) {
e = memchr(p, '/', (ctx->val.c + ctx->val.len) - p);
if (!e) {
e = ctx->val.c + ctx->val.len;
}
if ((e - p) && strncasecmp(p, ctx->lookup_data, (e - p))) {
doit = 0;
}
}
}
break;
#define RECOGNIZE(x) do { \
case sizeof(x)-1: \
if (strncasecmp(ctx->tag.c, x, sizeof(x)-1) == 0) \
doit = 1; \
break; \
} while (0)
RECOGNIZE("form");
RECOGNIZE("fieldset");
case sizeof("fieldset") - 1:
if (!strncasecmp(ctx->tag.c, "fieldset", sizeof("fieldset") - 1)) {
doit = 1;
}
break;
}
if (doit)
@@ -222,8 +235,6 @@ static void handle_form(STD_PARA)
}
}
/*
* HANDLE_TAG copies the HTML Tag and checks whether we
* have that tag in our table. If we might modify it,