fix a crash in DS with missing cert/key

This commit is contained in:
Stephen Birarda 2016-03-21 15:22:05 -07:00
parent 13a906aa20
commit 510e8e89f2

View file

@ -681,7 +681,12 @@ unsigned int DomainServer::countConnectedUsers() {
}
QUrl DomainServer::oauthRedirectURL() {
return QString("https://%1:%2/oauth").arg(_hostname).arg(_httpsManager->serverPort());
if (_httpsManager) {
return QString("http://%1:%2/oauth").arg(_hostname).arg(_httpsManager->serverPort());
} else {
qWarning() << "Attempting to determine OAuth re-direct URL with no HTTPS server configured.";
return QUrl();
}
}
const QString OAUTH_CLIENT_ID_QUERY_KEY = "client_id";