From 1b2d39857b8af25c5d071fd1afdd2dba1eb1452f Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 7 Jul 2025 08:47:24 +0000 Subject: [PATCH] reset x-forwarded-for before next req; assume the following stack: cpp <- rproxyA <- rproxyB <- WAN if A also accepts WAN requests, and A muxes both B and WAN onto a single connection to cpp, then WAN requests may get tagged with the IP-address of the most recent B request aside from the confusing logs, this could break unpost on servers with shared accounts --- copyparty/httpconn.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copyparty/httpconn.py b/copyparty/httpconn.py index 66b1adc7..11e00d1c 100644 --- a/copyparty/httpconn.py +++ b/copyparty/httpconn.py @@ -224,3 +224,6 @@ class HttpConn(object): if self.u2idx: self.hsrv.put_u2idx(str(self.addr), self.u2idx) self.u2idx = None + + if self.rproxy: + self.set_rproxy()