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:
parent
82b6216e95
commit
a28a68889d
@ -210,6 +210,10 @@ namespace Bit.Portal.Models
|
|||||||
|
|
||||||
private string StripPemCertificateElements(string certificateText)
|
private string StripPemCertificateElements(string certificateText)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(certificateText))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return Regex.Replace(certificateText,
|
return Regex.Replace(certificateText,
|
||||||
@"(((BEGIN|END) CERTIFICATE)|([\-\n\r\t\s\f]))",
|
@"(((BEGIN|END) CERTIFICATE)|([\-\n\r\t\s\f]))",
|
||||||
string.Empty,
|
string.Empty,
|
||||||
|
Loading…
Reference in New Issue
Block a user