From d147e222a4d52ba60841a1ad131e36c678b36d9f Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Tue, 13 Sep 2022 09:59:18 +0200 Subject: [PATCH] Prevent error messages to be unique by removing timestamp --- api/funkwhale_api/federation/signing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/funkwhale_api/federation/signing.py b/api/funkwhale_api/federation/signing.py index 42b38d8ff..efda81f2b 100644 --- a/api/funkwhale_api/federation/signing.py +++ b/api/funkwhale_api/federation/signing.py @@ -31,8 +31,9 @@ def verify_date(raw_date): delta = datetime.timedelta(seconds=DATE_HEADER_VALID_FOR) now = timezone.now() if dt < now - delta or dt > now + delta: + logger.error(f"Request Date {raw_date} is too too far in the future or in the past") raise forms.ValidationError( - "Request Date {} is too far in the future or in the past".format(raw_date) + "Request Date is too far in the future or in the past" ) return dt