Browse Source

[http_auth/mod_fastcgi] check get_http_*_name() for NULL return (#2583)

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3121 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/heads/lighttpd-1.4.x
Glenn Strauss 6 years ago committed by Stefan Bühler
parent
commit
733ce38203
  1. 1
      src/http_auth.c
  2. 2
      src/mod_fastcgi.c

1
src/http_auth.c

@ -964,6 +964,7 @@ int http_auth_digest_check(server *srv, connection *con, mod_auth_plugin_data *p
}
m = get_http_method_name(con->request.http_method);
force_assert(m);
/* password-string == HA1 */
password = buffer_init();

2
src/mod_fastcgi.c

@ -2010,9 +2010,11 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) {
}
s = get_http_method_name(con->request.http_method);
force_assert(s);
FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("REQUEST_METHOD"), s, strlen(s)),con)
FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("REDIRECT_STATUS"), CONST_STR_LEN("200")),con) /* if php is compiled with --force-redirect */
s = get_http_version_name(con->request.http_version);
force_assert(s);
FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_PROTOCOL"), s, strlen(s)),con)
if (buffer_is_equal_caseless_string(con->uri.scheme, CONST_STR_LEN("https"))) {

Loading…
Cancel
Save