[Interest] QNetworkConfigurationManager::isOnline always returns false on Android 11

Thiago Macieira thiago.macieira at intel.com
Mon Sep 28 18:39:04 CEST 2020


On Saturday, 26 September 2020 09:46:39 PDT Marian Beermann wrote:
> An interface like this is inherently racy. QNCM (obsolete) may tell you
> you are online, you connect to the server, send your stuff, and while
> that happens the device goes offline and you get an error. You probably
> handle this case already.

In other situations, this is called a TOCTOU attack (time of check, time of 
use). For example:

    if (!QFile::exists(filename))
        return false;
    QFile f(filename);
    f.open(QIODevice::ReadOnly);
    data = f.readAll();
    return true;

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Interest mailing list