polcak / jsrestrictor

JavaScript Restrictor web extension
GNU General Public License v3.0
249 stars 29 forks source link

Geolocation spoofing working inconsistently in several online mapping services #169

Open whatbh opened 2 years ago

whatbh commented 2 years ago

"Find my location" feature on a few sites (OpenStreetMap, Google Maps, browserleaks.com/geo) does not work at all when Geolocation API is enabled in JS Restrictor. Quick check in web console shows this error upon requesting location (Figure 1)

Uncaught TypeError: 'getCurrentPosition' called on an object that does not implement interface Geolocation.

Figure 1: Error in web console upon location request.

Screen Shot 2022-02-08 at 7 46 48 AM

Specifications: Firefox 98 on MacOS. Tested another alternative addon "Location Guard" and it worked fine.

polcak commented 2 years ago

Can you tell me your browser and JSR/JShelter version you use?

whatbh commented 2 years ago

Several updates have been released from last time. I tried again with Firefox 99 Nightly and JSR 0.7. Here's the more detailed report.

Tried with fresh Firefox profiles, no extension except JSR, one profile with resistFingerprinting enabled, the other with RFP disabled, both reproduce the same result.

Levels/Services Google Maps Bing Maps HERE Map OpenStreetMap https://browserleaks.com/geo
Turn off (Negative control) Can locate normally Can locate normally Can locate normally Can locate normally Can locate normally
Village Can locate normally Can locate normally Can locate normally 🚫 Error 🚫 Error
Recommended (Town) Can locate normally Can locate normally Can locate normally 🚫 Error (Do not show popup request location, show error in console) 🚫 Error (Do not show popup request location, show error in console)
Region Can locate normally ⚠️ Work sometimes 🚫 Error 🚫 Error 🚫 Error
Long distance Can locate normally ⚠️ Work sometimes 🚫 Error 🚫 Error 🚫 Error
Strict (Positive control) 🚫 Error 🚫 Error 🚫 Error 🚫 Error 🚫 Error

Conclusion: Some how it does not work with OpenStreetMap and "https://browserleaks.com/geo". Maybe I should update the title. Update: At "Region" and "Long distance" levels, it's sluggish with Bing Maps, works intermittently, and with HERE Maps it doesn't work at all.

polcak commented 1 year ago

I see I did not propagated the pagure issue here https://pagure.io/JShelter/webextension/issue/22