Skip to content

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

Potential fix for code scanning alert no. 59: Clear-text logging of sensitive information (#12069)

Yingfeng3ea84ad9c85d
diff --git a/common/http_client.py b/common/http_client.py
index b74676da63..cfd0687a76 100644
--- a/common/http_client.py
+++ b/common/http_client.py
@@ -174,6 +174,12 @@ async def async_request(
logger.warning(
f"async_request attempt {attempt + 1}/{retries + 1} failed for {method}; retrying in {delay:.2f}s"
)
+ raise
+ delay = _get_delay(backoff_factor, attempt)
+ # Avoid including the (potentially sensitive) URL in retry logs.
+ logger.warning(
+ f"async_request attempt {attempt + 1}/{retries + 1} failed for {method}; retrying in {delay:.2f}s"
+ )
await asyncio.sleep(delay)
raise last_exc # pragma: no cover