mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #42869 (automatic session id insertion adds sessions id to
non-local forms)
This commit is contained in:
parent
4e339842fc
commit
774136736e
File diff suppressed because it is too large
Load Diff
@ -205,16 +205,29 @@ static void handle_form(STD_PARA)
|
|||||||
|
|
||||||
if (ctx->form_app.len > 0) {
|
if (ctx->form_app.len > 0) {
|
||||||
switch (ctx->tag.len) {
|
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("fieldset") - 1:
|
||||||
case sizeof(x)-1: \
|
if (!strncasecmp(ctx->tag.c, "fieldset", sizeof("fieldset") - 1)) {
|
||||||
if (strncasecmp(ctx->tag.c, x, sizeof(x)-1) == 0) \
|
doit = 1;
|
||||||
doit = 1; \
|
}
|
||||||
break; \
|
break;
|
||||||
} while (0)
|
|
||||||
|
|
||||||
RECOGNIZE("form");
|
|
||||||
RECOGNIZE("fieldset");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doit)
|
if (doit)
|
||||||
@ -222,8 +235,6 @@ static void handle_form(STD_PARA)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HANDLE_TAG copies the HTML Tag and checks whether we
|
* HANDLE_TAG copies the HTML Tag and checks whether we
|
||||||
* have that tag in our table. If we might modify it,
|
* have that tag in our table. If we might modify it,
|
||||||
|
Loading…
Reference in New Issue
Block a user