1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00

Null ref exception when saving config fix (#927)

This commit is contained in:
Chad Scharf 2020-09-09 15:01:00 -04:00 committed by GitHub
parent 82b6216e95
commit a28a68889d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,6 +210,10 @@ namespace Bit.Portal.Models
private string StripPemCertificateElements(string certificateText)
{
if (string.IsNullOrWhiteSpace(certificateText))
{
return null;
}
return Regex.Replace(certificateText,
@"(((BEGIN|END) CERTIFICATE)|([\-\n\r\t\s\f]))",
string.Empty,