Commit d6c54f93 authored by Timo Teräs's avatar Timo Teräs

libfetch: fix no_proxy domain name comparision

Fix comparing of the hostname portion that matches exactly.
The no_proxy matching is pretty rudimentary though and probably
could go through a bit of additional rework.

Fixes #10681
parent 845b6397
Pipeline #11982 passed with stage
in 47 seconds
......@@ -1085,7 +1085,7 @@ fetch_no_proxy_match(const char *host)
break;
d_len = q - p;
if (d_len > 0 && h_len > d_len &&
if (d_len > 0 && h_len >= d_len &&
strncasecmp(host + h_len - d_len,
p, d_len) == 0) {
/* domain name matches */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment