From 52ae57dc4e1fd196face88b391963f36a3cb4544 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Thu, 14 Nov 2024 18:33:32 +0800 Subject: [PATCH] Remove unnecessary data from log and text properties Updated the log and text properties in segments to return empty strings instead of the segment value. This change prevents potential leakage of sensitive data by ensuring only non-sensitive information is logged or transformed into text. Addresses potential security and privacy concerns. --- api/core/variables/segments.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/api/core/variables/segments.py b/api/core/variables/segments.py index b71882b043..69bd5567a4 100644 --- a/api/core/variables/segments.py +++ b/api/core/variables/segments.py @@ -118,11 +118,11 @@ class FileSegment(Segment): @property def log(self) -> str: - return str(self.value) + return "" @property def text(self) -> str: - return str(self.value) + return "" class ArrayAnySegment(ArraySegment): @@ -155,3 +155,11 @@ class ArrayFileSegment(ArraySegment): for item in self.value: items.append(item.markdown) return "\n".join(items) + + @property + def log(self) -> str: + return "" + + @property + def text(self) -> str: + return ""