googlemaps icon indicating copy to clipboard operation
googlemaps copied to clipboard

qgeotilefetchergooglemaps.cpp using http://mt.google.com (in the open)

Open dlautz314 opened this issue 4 years ago • 2 comments

Can I suggest you change your the URL used in qgeotilefetchergooglemaps.cpp, from "http://mt.google.com/..." to use "https:/mt.google.com/..."? I believe the secure connection works fine. I think everyone will benefit.

We are being flagged my security auditors regarding the plugin accessing in the open (port 80).

Thanks, David

QString QGeoTileFetcherGooglemaps::_getURL(int type, int x, int y, int zoom)
{
    switch (type) {
    case 0:
    case 1: //Road Map
    {
        QString sec1    = ""; // after &x=...
        QString sec2    = ""; // after &zoom=...
        _getSecGoogleWords(x, y, sec1, sec2);
        return QString("http://mt.google.com/vt/lyrs=m&hl=%1&x=%2%3&y=%4&z=%5&s=%6&scale=%7").arg(_language).arg(x).arg(sec1).arg(y).arg(zoom).arg(sec2).arg(_scale);
    }
    break;
    case 2: //Satallite Map
    {
        QString sec1    = ""; // after &x=...
        QString sec2    = ""; // after &zoom=...
        _getSecGoogleWords(x, y, sec1, sec2);
        return QString("http://mt.google.com/vt/lyrs=s&hl=%1&x=%2%3&y=%4&z=%5&s=%6&scale=%7").arg(_language).arg(x).arg(sec1).arg(y).arg(zoom).arg(sec2).arg(_scale);
    }
    break;
    case 3: //Terrain Map
    {
        QString sec1    = ""; // after &x=...
        QString sec2    = ""; // after &zoom=...
        _getSecGoogleWords(x, y, sec1, sec2);
        return QString("http://mt.google.com/vt/lyrs=p&hl=%1&x=%2%3&y=%4&z=%5&s=%6&scale=%7").arg(_language).arg(x).arg(sec1).arg(y).arg(zoom).arg(sec2).arg(_scale);
    }
    break;
    case 4: //Hybrid Map
    {
        QString sec1    = ""; // after &x=...
        QString sec2    = ""; // after &zoom=...
        _getSecGoogleWords(x, y, sec1, sec2);
        return QString("http://mt.google.com/vt/lyrs=y&hl=%1&x=%2%3&y=%4&z=%5&s=%6&scale=%7").arg(_language).arg(x).arg(sec1).arg(y).arg(zoom).arg(sec2).arg(_scale);
    }
    break;
    }
    return "";
}

dlautz314 avatar Mar 15 '21 18:03 dlautz314

can you please provide a change request, I'll approve it? thanks

vladest avatar Mar 15 '21 19:03 vladest

Vlad, thank you.

Can you please tag as well when you get the chance?

Thanks

dlautz314 avatar Mar 19 '21 21:03 dlautz314