1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-23 17:07:42 +01:00

Allow mac for EncryptedString

This commit is contained in:
Kyle Spearrin 2017-01-02 21:52:48 -05:00
parent 9cde513026
commit 9e17c2e50c

View File

@ -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
{