if bitwarden TOTP is not defined, do not pass totp as part of the credential to llm (#899)

This commit is contained in:
Kerem Yilmaz
2024-10-02 14:02:49 -07:00
committed by GitHub
parent 17c680d439
commit 4f6feae03e
2 changed files with 9 additions and 6 deletions

View File

@@ -177,11 +177,13 @@ class BitwardenService:
{
BitwardenConstants.USERNAME: item["login"]["username"],
BitwardenConstants.PASSWORD: item["login"]["password"],
BitwardenConstants.TOTP: totp_code,
}
for item in items
if "login" in item
]
if totp_code:
for credential in credentials:
credential[BitwardenConstants.TOTP] = totp_code
if len(credentials) == 0:
return {}