mirror of
https://github.com/bitwarden/server
synced 2025-12-16 08:13:33 +00:00
Null ref exception when saving config fix (#927)
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user