Browse Source

[mod_extforward] fix crash on invalid IP (fixes #2766)

x-ref:
  "crashes for invalid IP addresses when using mod_extforward"
  https://redmine.lighttpd.net/issues/2766
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
bb30f44530
  1. 1
      src/mod_extforward.c

1
src/mod_extforward.c

@ -424,6 +424,7 @@ URIHANDLER_FUNC(mod_extforward_uri_handler) {
if (real_remote_addr != NULL) { /* parsed */
sock_addr sock;
data_string *forwarded_proto = (data_string *)array_get_element(con->request.headers, "X-Forwarded-Proto");
sock.plain.sa_family = AF_UNSPEC;
if (NULL != forwarded_proto) {
if (buffer_is_equal_caseless_string(forwarded_proto->value, CONST_STR_LEN("https"))) {

Loading…
Cancel
Save