mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-29 19:18:42 -07:00
Perform ip string validation inside setWebUiAuthSubnetWhitelist
This commit is contained in:
parent
98a2dedb32
commit
d184bd8c82
4 changed files with 16 additions and 18 deletions
|
@ -68,12 +68,10 @@ void IPSubnetWhitelistOptionsDialog::on_buttonBox_accepted()
|
|||
{
|
||||
if (m_modified) {
|
||||
// save to session
|
||||
QList<Utils::Net::Subnet> subnets;
|
||||
QStringList subnets;
|
||||
// Operate on the m_sortFilter to grab the strings in sorted order
|
||||
for (int i = 0; i < m_sortFilter->rowCount(); ++i) {
|
||||
const QString subnet = m_sortFilter->index(i, 0).data().toString();
|
||||
subnets.append(QHostAddress::parseSubnet(subnet));
|
||||
}
|
||||
for (int i = 0; i < m_sortFilter->rowCount(); ++i)
|
||||
subnets.append(m_sortFilter->index(i, 0).data().toString());
|
||||
Preferences::instance()->setWebUiAuthSubnetWhitelist(subnets);
|
||||
QDialog::accept();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue