Limit text length and number of level labels

This commit is contained in:
Slendy 2022-09-18 15:27:54 -05:00
commit 2a44e85a30
No known key found for this signature in database
GPG key ID: 7288D68361B91428
3 changed files with 5 additions and 3 deletions

View file

@ -29,10 +29,10 @@ public class SlotSettingsPage : BaseLayout
if (avatarHash != null) this.Slot.IconHash = avatarHash;
name = SanitizationHelper.SanitizeString(name);
if (this.Slot.Name != name) this.Slot.Name = name;
if (this.Slot.Name != name && name.Length <= 64) this.Slot.Name = name;
description = SanitizationHelper.SanitizeString(description);
if (this.Slot.Description != description) this.Slot.Description = description;
if (this.Slot.Description != description && description.Length <= 512) this.Slot.Description = description;
labels = LabelHelper.RemoveInvalidLabels(SanitizationHelper.SanitizeString(labels));
if (this.Slot.AuthorLabels != labels) this.Slot.AuthorLabels = labels;