browser icon indicating copy to clipboard operation
browser copied to clipboard

Possible False Flagging of User Agents as Bots

Open GuiSousaJS opened this issue 9 months ago • 0 comments

Hello I'm creating this issue to evaluate the possibility of whiteflagging some devices from the known bot matcher verification.

Essentially what is happening in the lib/browser/bot/known_bots_matcher.rb class is that the gem verifies if the user agents contains key values present in the bots.yml file, however there are certain mobile phones whose codename is present as one of the keys that the code will try to match with.

For example the Redmi Note Pro 12 mobile has ruby as its codename (proof here) so the user agent string will contain ruby in it which in turn causes its to be flagged as bots when calling the bot? function. Another good example of this is the Motorola G20 mobile which is codenamed java (proof here).

Would it be possible to "ease" the restrictions on some of these mobile phone models ?

Here are excerpts of user agent strings that would be matched as a known bot users:

  • Android (34/14; 440dpi; 1080x2176; Xiaomi/Redmi; 22101316G; ruby; mt6877

  • Android (30/11; 280dpi; 720x1466; motorola; moto g(20); java; ums512_1h10

Edit: Forgot to say, to replicate these sorts of user agents strings you would need to use the instagram browser

GuiSousaJS avatar Feb 05 '25 12:02 GuiSousaJS