Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix: obfuscate additional server secrets values (#9014)

Gifford Nowland34c35cf8ae19
diff --git a/api/utils/__init__.py b/api/utils/__init__.py
index 92086b99b1..a6152d5fb2 100644
--- a/api/utils/__init__.py
+++ b/api/utils/__init__.py
@@ -76,6 +76,22 @@ def show_configs():
if "secret_key" in v:
v = copy.deepcopy(v)
v["secret_key"] = "*" * 8
+ if "secret" in v:
+ v = copy.deepcopy(v)
+ v["secret"] = "*" * 8
+ if "sas_token" in v:
+ v = copy.deepcopy(v)
+ v["sas_token"] = "*" * 8
+ if "oauth" in k:
+ v = copy.deepcopy(v)
+ for key, val in v.items():
+ if "client_secret" in val:
+ val["client_secret"] = "*" * 8
+ if "authentication" in k:
+ v = copy.deepcopy(v)
+ for key, val in v.items():
+ if "http_secret_key" in val:
+ val["http_secret_key"] = "*" * 8
msg += f"\n\t{k}: {v}"
logging.info(msg)