diff options
author | Omar Polo <op@omarpolo.com> | 2024-08-24 09:48:11 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-08-24 09:48:11 +0000 |
commit | 3ec1d34a16a6c778a9e4c89879db4ffd2d9c17f6 (patch) | |
tree | f85eaae6232e4ff31f8b4a96da0f4615a3f50cd0 | |
parent | 07893552478cb648ca4ebac64885a27719c437b3 (diff) |
fix previous; no need to match_host for the alias
The issue with the test was due to differences in upper/lower cased
letters in the domain names. Normally these don't matter, and when
decoding the IRI we lowercase, BUT the SNI can have upper-case
letters and we preserve them as-is in `c->domain'.
-rw-r--r-- | server.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1020,8 +1020,7 @@ client_read(struct bufferevent *bev, void *d) /* ignore the port number */ if (strcmp(c->iri.schema, "gemini") || - c->host == NULL || - !match_host(c->host, c)) { + strcasecmp(c->domain, decoded)) { start_reply(c, PROXY_REFUSED, "won't proxy request"); return; } |