From eecff2cd9b1aec3c0ccc1c4d884f2fc8ae292420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 2 Dec 2022 09:57:51 +0100 Subject: [PATCH] fix: Do not pass the user_agent if a device_name is set Fix https://github.com/Lookyloo/lookyloo/issues/556 --- lookyloo/lookyloo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index e184bc1b..a5fc1a71 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -467,7 +467,8 @@ class Lookyloo(): if not user_agent: # Catch case where the UA is broken on the UI, and the async submission. self.user_agents.user_agents # triggers an update of the default UAs - query['user_agent'] = user_agent if user_agent else self.user_agents.default['useragent'] + if 'device_name' not in query: + query['user_agent'] = user_agent if user_agent else self.user_agents.default['useragent'] # NOTE: the document must be base64 encoded document = query.pop('document', None)