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

Invalid regex in trigger-message will cause it to fail in a way hard to debug #24

Closed
ghost opened this issue Jun 18, 2024 · 3 comments · Fixed by #25
Closed

Invalid regex in trigger-message will cause it to fail in a way hard to debug #24

ghost opened this issue Jun 18, 2024 · 3 comments · Fixed by #25

Comments

@ghost
Copy link

ghost commented Jun 18, 2024

An exception is thrown here, not printed, caught by me with java debugger

if (kickMessage.matches(CONFIG.triggerMessage)) {

This leads to ghost-like state, where player is not on backend and not in limbo, just waiting for time out.
Writing anything in chat in that state leads to issues like #21 #23.
I'm not an expert in Java, but I would suggest adding try-catch blocks there, kicking player on any errors.
Also, precompiling Pattern in advance while loading config can make this error more descriptive. Also javadoc says it can squish a bit of performance that way.

@ghost
Copy link
Author

ghost commented Jun 18, 2024

Also your maven repo is down for some reason, I can't PR a fix.
image

@hevav
Copy link
Member

hevav commented Jun 18, 2024

Also your maven repo is down for some reason, I can't PR a fix. image

try again

@SkyWatcher2019
Copy link
Member

Oh, seriously... I never thought that issue was in regex.

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

Successfully merging a pull request may close this issue.

2 participants