[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
This commit is contained in:
parent
6533056289
commit
bb30f44530
|
@ -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…
Reference in New Issue