mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Rename function
This commit is contained in:
parent
4094a4c448
commit
851374e517
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user