Browse Source

do not set REDIRECT_URI in mod_magnet, mod_rewrite (#2738)

reverts commit:b473220d

x-ref:
  "mediawiki redirect loop if REQUEST_URI not orig req in 1.4.40"
  https://redmine.lighttpd.net/issues/2738
personal/stbuehler/mod-csrf-old
Glenn Strauss 5 years ago
parent
commit
ed340897a2
  1. 6
      src/mod_magnet.c
  2. 7
      src/mod_rewrite.c

6
src/mod_magnet.c

@ -1015,12 +1015,6 @@ static handler_t magnet_attract(server *srv, connection *con, plugin_data *p, bu
result = HANDLER_FINISHED;
} else if (MAGNET_RESTART_REQUEST == lua_return_value) {
if (!buffer_is_equal(con->request.uri, con->request.orig_uri)
&& !array_get_element(con->environment, "REDIRECT_URI")) {
array_set_key_value(con->environment,
CONST_STR_LEN("REDIRECT_URI"),
CONST_BUF_LEN(con->request.orig_uri));
}
result = HANDLER_COMEBACK;
}

7
src/mod_rewrite.c

@ -444,13 +444,6 @@ static handler_t process_rewrite_rules(server *srv, connection *con, plugin_data
if (rule->once) hctx->state = REWRITE_STATE_FINISHED;
if (!buffer_is_equal(con->request.uri, con->request.orig_uri)
&& !array_get_element(con->environment, "REDIRECT_URI")) {
array_set_key_value(con->environment,
CONST_STR_LEN("REDIRECT_URI"),
CONST_BUF_LEN(con->request.orig_uri));
}
return HANDLER_COMEBACK;
}
#undef N

Loading…
Cancel
Save