Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Update sensitive data

Magnus Müller1b6b67479685
diff --git a/browser_use/agent/views.py b/browser_use/agent/views.py
index 5cb80eb86..86156365d 100644
--- a/browser_use/agent/views.py
+++ b/browser_use/agent/views.py
@@ -330,7 +330,7 @@ class AgentHistory(BaseModel):
# Filter sensitive data only from input action parameters if sensitive_data is provided
if sensitive_data:
action_dump = [
- self._filter_sensitive_data_from_dict(action, sensitive_data) if action.get('name') == 'input' else action
+ self._filter_sensitive_data_from_dict(action, sensitive_data) if 'input' in action else action
for action in action_dump
]