Merge pull request #1827 from nextcloud/fix-webflow-username-case

WebFlowCredentials: Make username comparison case-insensitive (fix #1741)
This commit is contained in:
Michael Schuster 2020-03-03 06:25:35 +01:00 committed by GitHub
commit 377526d6f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -183,7 +183,11 @@ void WebFlowCredentials::askFromUser() {
void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host) {
Q_UNUSED(host)
if (_user != user) {
// Compare the re-entered username case-insensitive and save the new value (avoid breaking the account)
// See issue: https://github.com/nextcloud/desktop/issues/1741
if (QString::compare(_user, user, Qt::CaseInsensitive) == 0) {
_user = user;
} else {
qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!";
QString msg = tr("Please login with the user: %1")