aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-03-12 16:04:24 +0000
committerLaurent Bercot <ska@appnovation.com>2025-03-12 16:04:24 +0000
commit53fdbac9da06a0dfb3f2821f7c7384001eea4f68 (patch)
treeeede4a15726a714662237cb4750607607b7cbd43 /src
parent5bff0302c9af97b1b2a17dc5548cba5facc1c5bc (diff)
downloadtipidee-53fdbac9da06a0dfb3f2821f7c7384001eea4f68.tar.gz
bugfix: use TCPLOCALPORT instead of Host: port to determine docroot
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/tipideed/tipideed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c
index 2d3c687..a5f9fcd 100644
--- a/src/tipideed/tipideed.c
+++ b/src/tipideed/tipideed.c
@@ -524,7 +524,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (rql.uri.host[hostlen - 1] == '.') hostlen-- ;
memcpy(docroot, rql.uri.host, hostlen) ;
docroot[hostlen] = ':' ;
- docroot[hostlen + 1 + uint16_fmt(docroot + hostlen + 1, rql.uri.port)] = 0 ;
+ docroot[hostlen + 1 + uint16_fmt(docroot + hostlen + 1, g.defaultport)] = 0 ; /* don't allow clients to spoof the port */
/* All good. Read the body if any */