|
|
@ -437,16 +437,8 @@ void prefjson::setPreferences(const QString& json) |
|
|
|
if (m.contains("bypass_auth_subnet_whitelist_enabled")) |
|
|
|
if (m.contains("bypass_auth_subnet_whitelist_enabled")) |
|
|
|
pref->setWebUiAuthSubnetWhitelistEnabled(m["bypass_auth_subnet_whitelist_enabled"].toBool()); |
|
|
|
pref->setWebUiAuthSubnetWhitelistEnabled(m["bypass_auth_subnet_whitelist_enabled"].toBool()); |
|
|
|
if (m.contains("bypass_auth_subnet_whitelist")) { |
|
|
|
if (m.contains("bypass_auth_subnet_whitelist")) { |
|
|
|
QList<Utils::Net::Subnet> subnets; |
|
|
|
// recognize new lines and commas as delimiters
|
|
|
|
// recognize new line and comma as delimiters
|
|
|
|
pref->setWebUiAuthSubnetWhitelist(m["bypass_auth_subnet_whitelist"].toString().split(QRegularExpression("\n|,"), QString::SkipEmptyParts)); |
|
|
|
foreach (QString subnetString, m["bypass_auth_subnet_whitelist"].toString().split(QRegularExpression("\n|,"), QString::SkipEmptyParts)) { |
|
|
|
|
|
|
|
bool ok = false; |
|
|
|
|
|
|
|
const Utils::Net::Subnet subnet = Utils::Net::parseSubnet(subnetString.trimmed(), &ok); |
|
|
|
|
|
|
|
if (ok) |
|
|
|
|
|
|
|
subnets.append(subnet); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pref->setWebUiAuthSubnetWhitelist(subnets); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// Update my dynamic domain name
|
|
|
|
// Update my dynamic domain name
|
|
|
|
if (m.contains("dyndns_enabled")) |
|
|
|
if (m.contains("dyndns_enabled")) |
|
|
|