From 372a618cbebcba051f770b37860a81e412e40f8f Mon Sep 17 00:00:00 2001 From: Ske Date: Wed, 10 Jul 2019 10:02:46 +0200 Subject: [PATCH] Bounds check color parameter validation --- PluralKit.Bot/Commands/MemberCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/MemberCommands.cs b/PluralKit.Bot/Commands/MemberCommands.cs index 1b33ef63..ba9568e6 100644 --- a/PluralKit.Bot/Commands/MemberCommands.cs +++ b/PluralKit.Bot/Commands/MemberCommands.cs @@ -116,7 +116,7 @@ namespace PluralKit.Bot.Commands if (color != null) { if (color.StartsWith("#")) color = color.Substring(1); - if (!Regex.IsMatch(color, "[0-9a-f]{6}")) throw Errors.InvalidColorError(color); + if (!Regex.IsMatch(color, "^[0-9a-f]{6}$")) throw Errors.InvalidColorError(color); } ContextEntity.Color = color;