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

Java pattern is too specific and has a syntax error #63

Open
alanorth opened this issue Jan 29, 2024 · 0 comments
Open

Java pattern is too specific and has a syntax error #63

alanorth opened this issue Jan 29, 2024 · 0 comments

Comments

@alanorth
Copy link
Contributor

I just noticed the user agent Java/21 in my server access log. We currently have the following pattern in COUNTER-Robots:

^java\/\d{1,2}.\d

This pattern matches java/1.8 but not Java/21 (see https://regex101.com/r/pweujD/1). Also, I'm just realizing that the dot should be escaped so it is interpreted as a literal dot, not a regex metacharacter.

I suggest the pattern be updated to be ^java\/\d+ or perhaps even just ^java. Both are enough to uniquely identify the user agent.

@alanorth alanorth changed the title Java pattern is too specific Java pattern is too specific and has a syntax error Jan 29, 2024
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

1 participant