diff --git a/artemis/module_base.py b/artemis/module_base.py index 1ec8bd343..efe14ac2a 100644 --- a/artemis/module_base.py +++ b/artemis/module_base.py @@ -434,7 +434,7 @@ def _get_scan_destination(self, task: Task) -> str: cache_key = "scan-destination-" + task.uid cached_destination = self.cache.get(cache_key) if cached_destination: - return cached_destination.decode("ascii") + return cached_destination.decode("utf-8") result = None if task.headers["type"] == TaskType.NEW: @@ -473,7 +473,7 @@ def _get_scan_destination(self, task: Task) -> str: result = task.payload["host"] assert isinstance(result, str) - self.cache.set(cache_key, result.encode("ascii")) + self.cache.set(cache_key, result.encode("utf-8")) return result def _get_ip_for_locking(self, host: str) -> str: