From c8ac19e15b795897072ff2e599f758e51fa0e810 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Wed, 31 Jan 2024 13:30:01 +0100 Subject: [PATCH] Safety trim --- changedetectionio/update_worker.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/changedetectionio/update_worker.py b/changedetectionio/update_worker.py index 4d401861..3fa47e37 100644 --- a/changedetectionio/update_worker.py +++ b/changedetectionio/update_worker.py @@ -494,10 +494,9 @@ class update_worker(threading.Thread): # Record the 'server' header reply, can be used for actions in the future like cloudflare/akamai workarounds try: + server_header = update_handler.fetcher.headers.get('server', '').lower()[:255] self.datastore.update_watch(uuid=uuid, - update_obj={ - 'remote_server_reply': update_handler.fetcher.headers.get('server', '').lower() - } + update_obj={'remote_server_reply': server_header} ) except Exception as e: pass