X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fldapauthenticator.cpp;h=90b7e8941bceed917fb4940430fb9f83635db12b;hp=378fc4bba1751d5d92236fabde8124dafdec74c7;hb=7fb88a023ef8e4658b39d22c2d88c0d8bd6709f8;hpb=d6f3eedebc7f9619b04dffc5f48faa792950fdcd diff --git a/src/core/ldapauthenticator.cpp b/src/core/ldapauthenticator.cpp index 378fc4bb..90b7e894 100644 --- a/src/core/ldapauthenticator.cpp +++ b/src/core/ldapauthenticator.cpp @@ -118,11 +118,17 @@ UserId LdapAuthenticator::validateUser(const QString &username, const QString &p // If auth succeeds, but the user has not logged into quassel previously, make // a new user for them and return that ID. - // Users created via LDAP have empty usernames. + // Users created via LDAP have empty passwords, but authenticator column = LDAP. + // On the other hand, if auth succeeds and the user already exists, do a final + // cross-check to confirm we're using the right auth provider. UserId quasselID = Core::validateUser(username, QString()); if (!quasselID.isValid()) { - return Core::addUser(username, QString()); + return Core::addUser(username, QString(), displayName()); + } + else if (!(Core::checkAuthProvider(quasselID, displayName()))) + { + return 0; } return quasselID; }