Prevent null values from being censored

This commit is contained in:
Slendy 2023-04-03 01:02:41 -05:00
commit d6788f0965
No known key found for this signature in database
GPG key ID: 7288D68361B91428
2 changed files with 24 additions and 9 deletions

View file

@ -33,9 +33,12 @@ public class UserSettingsPage : BaseLayout
if (avatarHash != null) this.ProfileUser.IconHash = avatarHash;
biography = CensorHelper.FilterMessage(biography);
if (this.ProfileUser.Biography != biography && biography.Length <= 512) this.ProfileUser.Biography = biography;
if (biography != null)
{
biography = CensorHelper.FilterMessage(biography);
if (this.ProfileUser.Biography != biography && biography.Length <= 512)
this.ProfileUser.Biography = biography;
}
if (ServerConfiguration.Instance.Mail.MailEnabled &&
SanitizationHelper.IsValidEmail(email) &&