brendanlim / mobile-fu

Automatically detect mobile requests from mobile devices in your Rails application.
http://www.intridea.com/2008/7/21/mobilize-your-rails-application-with-mobile-fu
MIT License
707 stars 195 forks source link

Creative AutoUpdater modifies IE8 useragent resulting in a false positive #1

Open cheald opened 15 years ago

cheald commented 15 years ago

Creative's AutoUpdater (for soundcard drivers, etc) modifies the IE8 UserAgent (I have NFI why Creative thinks they are important enough to warrant this).

The modified user agent is: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; Creative AutoUpdate v1.40.01)

This matches the "pda" substring in the mobile_fu regex, resulting in IE8 users with Creative soundcards being served a mobile version of the site.

This could be solved by changing the "pda" to "\bpda", to check that the string "PDA" is preceded by a word boundary, rather than being a substring.

benlangfeld commented 10 years ago

This project is abandoned. Please see the active fork at http://github.com/benlangfeld/mobile-fu. Please test with the released gem and master branch of the new home for the project, and file an issue on the other repo if you still have problems.

See #40.