Wizard: Find user:pw even if redirected #4265

This commit is contained in:
Christian Kamm 2015-12-09 14:45:50 +01:00
parent 3de8f27a02
commit fe75c6ad28

View file

@ -81,6 +81,13 @@ void OwncloudHttpCredsPage::initializePage()
} else {
QUrl url = ocWizard->account()->url();
// If the final url does not have a username, check the
// user specified url too. Sometimes redirects can lose
// the user:pw information.
if (url.userName().isEmpty()) {
url = ocWizard->ocUrl();
}
const QString user = url.userName();
const QString password = url.password();