mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 16:27:23 +01:00
fix regex for vanity ids
This commit is contained in:
parent
e2e97065f4
commit
08b04e14d5
1 changed files with 2 additions and 2 deletions
|
|
@ -169,7 +169,7 @@ public class DiscordBot : IHostedService
|
|||
}
|
||||
}
|
||||
|
||||
Regex rgx = new(@"[_\-a-zA-Z0-9]{5,20}", RegexOptions.ECMAScript);
|
||||
Regex rgx = new(@"^[_\-a-zA-Z0-9]{5,20}$", RegexOptions.ECMAScript);
|
||||
if (!rgx.Match(newGid).Success || newGid.Length < 5 || newGid.Length > 20)
|
||||
{
|
||||
eb.WithTitle("Failed to set Vanity Syncshell Id");
|
||||
|
|
@ -236,7 +236,7 @@ public class DiscordBot : IHostedService
|
|||
}
|
||||
}
|
||||
|
||||
Regex rgx = new(@"[_\-a-zA-Z0-9]{5,15}", RegexOptions.ECMAScript);
|
||||
Regex rgx = new(@"^[_\-a-zA-Z0-9]{5,15}$", RegexOptions.ECMAScript);
|
||||
if (!rgx.Match(newUid).Success || newUid.Length < 5 || newUid.Length > 15)
|
||||
{
|
||||
eb.WithTitle("Failed to set Vanity UID");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue