revert map fetcher

This commit is contained in:
_Bastler 2021-08-11 16:26:33 +02:00
parent 9c7c1e091a
commit d6931f4ed9

View File

@ -10,9 +10,9 @@ class MapFetcher {
async fetchMap(mapUrl: string): Promise<ITiledMap> {
// Before trying to make the query, let's verify the map is actually on the open internet (and not a local test map)
//if (await this.isLocalUrl(mapUrl)) {
if (await this.isLocalUrl(mapUrl)) {
throw new LocalUrlError('URL for map "' + mapUrl + '" targets a local map');
//}
}
// Note: mapUrl is provided by the client. A possible attack vector would be to use a rogue DNS server that
// returns local URLs. Alas, Axios cannot pin a URL to a given IP. So "isLocalUrl" and Axios.get could potentially