mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Rename function
This commit is contained in:
parent
4094a4c448
commit
851374e517
3 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue