mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 13:55:47 +03:00
Merge pull request #1827 from nextcloud/fix-webflow-username-case
WebFlowCredentials: Make username comparison case-insensitive (fix #1741)
This commit is contained in:
commit
377526d6f9
1 changed files with 5 additions and 1 deletions
|
@ -183,7 +183,11 @@ void WebFlowCredentials::askFromUser() {
|
||||||
void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host) {
|
void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host) {
|
||||||
Q_UNUSED(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!";
|
qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!";
|
||||||
|
|
||||||
QString msg = tr("Please login with the user: %1")
|
QString msg = tr("Please login with the user: %1")
|
||||||
|
|
Loading…
Reference in a new issue