You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
alanorth
changed the title
Java pattern is too specific
Java pattern is too specific and has a syntax error
Jan 29, 2024
I just noticed the user agent
Java/21
in my server access log. We currently have the following pattern in COUNTER-Robots:This pattern matches
java/1.8
but notJava/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.The text was updated successfully, but these errors were encountered: