security(gateway): isolate env/credential registries using ContextVars
This commit is contained in:
@@ -3252,6 +3252,18 @@ class GatewayRunner:
|
||||
logger.debug("Gateway memory flush on reset failed: %s", e)
|
||||
self._evict_cached_agent(session_key)
|
||||
|
||||
try:
|
||||
from tools.env_passthrough import clear_env_passthrough
|
||||
clear_env_passthrough()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
from tools.credential_files import clear_credential_files
|
||||
clear_credential_files()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Reset the session
|
||||
new_entry = self.session_store.reset_session(session_key)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user