From 6eb4f0ad9cc266abd5007509a15be93daa887ccf Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 12 Mar 2026 00:33:26 +0100 Subject: [PATCH] ver-chk: fix admin-filter (closes #1363); also drop cache if json invalid --- copyparty/httpcli.py | 2 +- copyparty/svchub.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 7d1ac9dd..20d0e6f2 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -5644,7 +5644,7 @@ class HttpCli(object): no304vis=self.args.no304 > 0, msg=( BADVER - if self.conn.hsrv.bad_ver and self.can_admin + if self.conn.hsrv.bad_ver and avol else BADXFFB if hasattr(self, "bad_xff") else "" diff --git a/copyparty/svchub.py b/copyparty/svchub.py index 93b0730b..fd581c20 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -1871,3 +1871,7 @@ class SvcHub(object): except Exception as e: t = "failed to process vulnerability advisory; %s" self.log("ver-chk", t % (min_ex()), 1) + try: + os.unlink(fpath) + except: + pass