From d199c83a61ada0a9cae26c40e8d289dc13fb8941 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 7 Jun 2019 10:31:41 -0400 Subject: [PATCH] null check --- src/App/Utilities/PasswordFormatter.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App/Utilities/PasswordFormatter.cs b/src/App/Utilities/PasswordFormatter.cs index 0e20eb2e9..857e51855 100644 --- a/src/App/Utilities/PasswordFormatter.cs +++ b/src/App/Utilities/PasswordFormatter.cs @@ -21,8 +21,13 @@ namespace Bit.App.Utilities Special } - public static FormattedString FormatPassword(String password) + public static FormattedString FormatPassword(string password) { + if(password == null) + { + return new FormattedString(); + } + var result = new FormattedString(); // Start off with an empty span to prevent possible NPEs. Due to the way the state machine // works, this will actually always be replaced by a new span anyway.