From 8fd7c45b9bef0ed7a4578c8b13741880c8c9bb79 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 29 Apr 2024 23:51:09 +0200 Subject: [PATCH] Add warning on old cipher --- agent/bitwarden/crypto/encstring.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/bitwarden/crypto/encstring.go b/agent/bitwarden/crypto/encstring.go index dcca6a8..a4c9fc8 100644 --- a/agent/bitwarden/crypto/encstring.go +++ b/agent/bitwarden/crypto/encstring.go @@ -58,7 +58,9 @@ func (s *EncString) UnmarshalText(data []byte) error { } switch s.Type { - case AesCbc128_HmacSha256_B64, AesCbc256_HmacSha256_B64, AesCbc256_B64: + case AesCbc256_HmacSha256_B64: + case AesCbc128_HmacSha256_B64, AesCbc256_B64: + return errors.New("outdated cipher of type: " + strconv.Itoa(int(s.Type)) + " detected. PLEASE ROTATE YOU VAULT KEYS") default: return errors.New("invalid cipher string type, unknown type: " + strconv.Itoa(int(s.Type))) }