Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Improve placeholder handling for 2FA secrets in registry service
LarsenCundricdd8a63ce41b6
diff --git a/browser_use/tools/registry/service.py b/browser_use/tools/registry/service.pyindex 846d2e239..77817cbf4 100644--- a/browser_use/tools/registry/service.py+++ b/browser_use/tools/registry/service.py@@ -455,8 +455,8 @@ class Registry(Generic[Context]):# check if the placeholder key, like x_password is in the output parameters of the LLM and replace it with the sensitive datafor placeholder in matches:if placeholder in applicable_secrets:- # generate a totp code if secret is a 2fa secret- if 'bu_2fa_code' in placeholder:+ # generate a totp code if secret is suffixed with bu_2fa_code+ if placeholder.endswith('bu_2fa_code'):totp = pyotp.TOTP(applicable_secrets[placeholder], digits=6)replacement_value = totp.now()else: