[core] $REQUEST_HEADER[...] subsumes other config (#1556)

x-ref:
  "Allow matching against any arbitrary HTTP header in the configuration file regexps"
  https://redmine.lighttpd.net/issues/1556
personal/stbuehler/mod-csrf
Glenn Strauss 6 years ago
parent 57ab20ace5
commit 78047a3c1b
  1. 4
      src/array.h
  2. 4
      src/response.c

@ -77,8 +77,8 @@ typedef enum {
COMP_HTTP_URL,
COMP_HTTP_HOST,
COMP_HTTP_REFERER, /*(subsumed by COMP_HTTP_REQUEST_HEADER)*/
COMP_HTTP_USER_AGENT,
COMP_HTTP_LANGUAGE,
COMP_HTTP_USER_AGENT, /*(subsumed by COMP_HTTP_REQUEST_HEADER)*/
COMP_HTTP_LANGUAGE, /*(subsumed by COMP_HTTP_REQUEST_HEADER)*/
COMP_HTTP_COOKIE, /*(subsumed by COMP_HTTP_REQUEST_HEADER)*/
COMP_HTTP_REMOTE_IP,
COMP_HTTP_QUERY_STRING,

@ -237,10 +237,6 @@ handler_t http_response_prepare(server *srv, connection *con) {
con->conditional_is_valid[COMP_HTTP_SCHEME] = 1; /* Scheme: */
con->conditional_is_valid[COMP_HTTP_HOST] = 1; /* Host: */
con->conditional_is_valid[COMP_HTTP_REMOTE_IP] = 1; /* Client-IP */
con->conditional_is_valid[COMP_HTTP_REFERER] = 1; /* Referer: */
con->conditional_is_valid[COMP_HTTP_USER_AGENT] = /* User-Agent: */
con->conditional_is_valid[COMP_HTTP_LANGUAGE] = 1; /* Accept-Language: */
con->conditional_is_valid[COMP_HTTP_COOKIE] = 1; /* Cookie: */
con->conditional_is_valid[COMP_HTTP_REQUEST_METHOD] = 1; /* REQUEST_METHOD */
con->conditional_is_valid[COMP_HTTP_URL] = 1; /* HTTPurl */
con->conditional_is_valid[COMP_HTTP_QUERY_STRING] = 1; /* HTTPqs */

Loading…
Cancel
Save