oalders/http-browserdetect

Webview detection uses wrong version number

oalders opened this issue · 0 comments

As reported by email:

the pattern matching for webview detection, lines 974-978. In this code block you're matching anything that's chrome + android + version 30.0 or greater. This isn't correct, according to the Google link in the documentation (See: https://developer.chrome.com/multidevice/user-agent#webview_user_agent ), the version number should not be included in the pattern matching but rather the Version/_X.X string. So rather than matching browser_major > 30, it should be a pattern match for the presence of Version/_X.X.

Using the code as-is, all android hits that are version 30.0 or greater are being reported as android - webview.