Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果昵称中有3个或更多的空格,那么它会被允许到具有空昵称的服务器 #486

Closed
RuslanFF opened this issue Jul 30, 2022 · 8 comments

Comments

@RuslanFF
Copy link

🐞 错误汇报

👉 如果昵称中有3个或更多的空格,那么它会被允许到具有空昵称的服务器

▶ 复现步骤

✍ 如果昵称中有3个或更多的空格,那么它会被允许到具有空昵称的服务器

✔ 预期行为

✍ 不应使用空昵称输入

❌ 实际行为

✍如果昵称中有 2 或 1 个空格,则一切正常,服务器不允许昵称为空的玩家

💬 其他信息

✍ 如果昵称有 2 或 1 个空格,则一切正常,服务器不允许玩家使用空昵称,但如果有 3 个或更多空格,则服务器以空昵称进入

@Mcayear
Copy link
Contributor

Mcayear commented Jul 30, 2022

你是不是想说,玩家名字不能有3个空格及以上?

@RuslanFF
Copy link
Author

不可以,如果玩家名字有3个或更多空格,那么服务器会以空名字进入

@Mcayear
Copy link
Contributor

Mcayear commented Jul 30, 2022

可以提供视频或者截图吗

@RuslanFF
Copy link
Author

Screenshot_2022-07-31-11-52-36-330

@RuslanFF
Copy link
Author

在minecraft的name字段中自己尝试,输入3个空格,然后去服务器

@smartcmd
Copy link
Member

you can use eng :)

@RuslanFF
Copy link
Author

Very good if it is possible to use English

CoolLoong pushed a commit that referenced this issue Apr 15, 2023
* Fixed a bug that allowed players with an empty nickname to join server

* Rewritten nickname checking

* Pre-compile regex

* Moved regex pattern to Player class

* Changed regex

* Changed visibility

* Changed name from Regex to pattern, added annotation for playerNamePattern and fix for length check in regex
@KoshakMineDEV
Copy link
Member

close this issue, fixed in #1138

@smartcmd smartcmd closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants