1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-22 20:44:15 +00:00

Rename function

This commit is contained in:
Chocobo1 2022-09-07 13:25:29 +08:00
parent 4094a4c448
commit 851374e517
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
3 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ namespace Utils
|| (addr == QHostAddress(u"::ffff:127.0.0.1"_qs));
}
bool isIPInRange(const QHostAddress &addr, const QVector<Subnet> &subnets)
bool isIPInSubnets(const QHostAddress &addr, const QVector<Subnet> &subnets)
{
QHostAddress protocolEquivalentAddress;
bool addrConversionOk = false;

View File

@ -45,7 +45,7 @@ namespace Utils::Net
bool isValidIP(const QString &ip);
std::optional<Subnet> parseSubnet(const QString &subnetStr);
bool isLoopbackAddress(const QHostAddress &addr);
bool isIPInRange(const QHostAddress &addr, const QVector<Subnet> &subnets);
bool isIPInSubnets(const QHostAddress &addr, const QVector<Subnet> &subnets);
QString subnetToString(const Subnet &subnet);
QHostAddress canonicalIPv6Addr(const QHostAddress &addr);

View File

@ -579,7 +579,7 @@ bool WebApplication::isAuthNeeded()
{
if (!m_isLocalAuthEnabled && Utils::Net::isLoopbackAddress(m_clientAddress))
return false;
if (m_isAuthSubnetWhitelistEnabled && Utils::Net::isIPInRange(m_clientAddress, m_authSubnetWhitelist))
if (m_isAuthSubnetWhitelistEnabled && Utils::Net::isIPInSubnets(m_clientAddress, m_authSubnetWhitelist))
return false;
return true;
}