From 85c6521b0714d2ef42f2a80562986f44427bfdc7 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 16 Aug 2022 22:17:30 +0100 Subject: [PATCH] Don't leak information through the query --- core/lib/opensearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/opensearch.py b/core/lib/opensearch.py index 55b60c3..ff8a316 100644 --- a/core/lib/opensearch.py +++ b/core/lib/opensearch.py @@ -419,7 +419,7 @@ def query_results( if not results: return False if isinstance(results, Exception): - message = results.info["error"]["root_cause"][0]["reason"] + message = f"Error: {results.info['error']['root_cause'][0]['type']}" message_class = "danger" return {"message": message, "class": message_class} if len(results["hits"]["hits"]) == 0: