From d6edbe8e8ddcfa87e3cb67608a281fdff48094ff Mon Sep 17 00:00:00 2001 From: Ske Date: Sun, 3 Nov 2019 19:16:06 +0100 Subject: [PATCH] Fix PATCHing members with one-sided proxy tags --- PluralKit.API/Controllers/MemberController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.API/Controllers/MemberController.cs b/PluralKit.API/Controllers/MemberController.cs index 158abd02..71247404 100644 --- a/PluralKit.API/Controllers/MemberController.cs +++ b/PluralKit.API/Controllers/MemberController.cs @@ -97,7 +97,7 @@ namespace PluralKit.API.Controllers return BadRequest($"Member descriptions too long ({newMember.Description.Length} > {Limits.MaxDescriptionLength}."); // Sanity bounds checks - if (newMember.ProxyTags?.Any(tag => tag.Prefix.Length > 1000 || tag.Suffix.Length > 1000) ?? false) + if (newMember.ProxyTags?.Any(tag => (tag.Prefix?.Length ?? 0) > 1000 || (tag.Suffix?.Length ?? 0) > 1000) ?? false) return BadRequest(); member.Name = newMember.Name;