fix crash and some UI issues

This commit is contained in:
Roxanne Skelly 2019-09-11 14:11:43 -07:00
parent a0ad1f3a68
commit 0f242deaf2
2 changed files with 5 additions and 4 deletions

View file

@ -145,13 +145,13 @@ $(document).ready(function(){
if (private_key != undefined) {
var pattern = /-+BEGIN PRIVATE KEY-+[A-Za-z0-9+/\n=]*-+END PRIVATE KEY-+/m;
if (!pattern.test(private_key)) {
oauthErrors = "Private key must be in PEM format";
oauthErrors += "Private key must be in PEM format<BR/>";
}
}
if (cert != undefined) {
var pattern = /-+BEGIN CERTIFICATE-+[A-Za-z0-9+/\n=]*-+END CERTIFICATE-+/m;
if (!pattern.test(cert)) {
oauthErrors = "Certificate must be in PEM format";
oauthErrors += "Certificate must be in PEM format<BR/>";
}
}
if ($('#oauth.panel').length) {

View file

@ -1270,9 +1270,10 @@ bool DomainServerSettingsManager::handleAuthenticatedHTTPRequest(HTTPConnection
QJsonArray groups;
foreach (const QJsonValue& group, settingGroups) {
QJsonObject groupObject = group.toObject();
QVariant* enableKey = _configMap.valueForKeyPath(groupObject[DESCRIPTION_NAME_KEY].toString() + "." + DESCRIPTION_ENABLE_KEY);
if (!groupObject.contains(DESCRIPTION_GROUP_SHOW_ON_ENABLE_KEY)
|| (groupObject[DESCRIPTION_GROUP_SHOW_ON_ENABLE_KEY].toBool()
&& _configMap.valueForKeyPath(groupObject[DESCRIPTION_NAME_KEY].toString() + "." + DESCRIPTION_ENABLE_KEY)->toBool() )) {
|| (groupObject[DESCRIPTION_GROUP_SHOW_ON_ENABLE_KEY].toBool() && enableKey && enableKey->toBool() )) {
groups.append(groupObject);
}
}