[core] accept up to 5 digit port num in host cond

(thx zebul66)

accept up to 5 digit port num in $HTTP["host"] condition match

x-ref:
  "Alls page and subdomain returns 404 with 1.4.60"
  https://redmine.lighttpd.net/boards/2/topics/10074
This commit is contained in:
Glenn Strauss 2021-10-16 19:52:49 -04:00
parent 69c2b2b207
commit 44b47fc271
1 changed files with 1 additions and 1 deletions

View File

@ -521,7 +521,7 @@ static cond_result_t config_check_cond_nocache(request_st * const r, const data_
/*(r->uri.authority lowercased during request parsing)*/
if (llen && llen != dlen) {
match ^= ((llen > dlen)
? l->ptr[dlen] == ':' && llen - dlen <= 5
? l->ptr[dlen] == ':' && llen - dlen <= 6
: dc->string.ptr[(dlen = llen)] == ':')
&& 0 == memcmp(l->ptr, dc->string.ptr, dlen);
break;