doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 9 forks source link

Front-end error when using invalid API keys and filtering entries query #16

Closed engram-design closed 3 years ago

engram-design commented 3 years ago

I was testing out a proximity query for entries, with the following:

{% set params = {
    section: 'mySection',
    orderBy: 'distance',
    limit: 10,
    address: {
        target: 'city country',
        range: 100,
    }
} %}

{% paginate craft.entries(params) as pageInfo, locations %}

I just happened to be using an API key that didn't allow my local domain (RefererNotAllowedMapError), and received the following error: https://d.pr/i/gdQ0mg

It would be great if there could be some protection on this!

engram-design commented 3 years ago

Already addressed in https://github.com/doublesecretagency/craft-googlemaps/commit/904bab68bae8da839353f4d4183aa9d14d5a13b9