mirror of
https://github.com/bitwarden/server
synced 2026-01-07 19:13:50 +00:00
Allow mac for EncryptedString
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Bit.Api.Utilities
|
||||
}
|
||||
|
||||
var encStringPieces = encString.Split('|');
|
||||
if(encStringPieces.Length != 2)
|
||||
if(encStringPieces.Length != 2 && encStringPieces.Length != 3)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -40,6 +40,15 @@ namespace Bit.Api.Utilities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(encStringPieces.Length == 3)
|
||||
{
|
||||
var mac = Convert.FromBase64String(encStringPieces[2]);
|
||||
if(mac.Length < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user