projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cmake: avoid de-duplication of user's CXXFLAGS
[quassel.git]
/
src
/
core
/
ldapauthenticator.cpp
diff --git
a/src/core/ldapauthenticator.cpp
b/src/core/ldapauthenticator.cpp
index
0eedc3c
..
89b390f
100644
(file)
--- a/
src/core/ldapauthenticator.cpp
+++ b/
src/core/ldapauthenticator.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-202
0
by the Quassel Project *
+ * Copyright (C) 2005-202
2
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-28,11
+28,12
@@
#include "ldapauthenticator.h"
#include "ldapauthenticator.h"
+#include "ldapescaper.h"
#include "network.h"
#include "quassel.h"
/* We should use openldap on windows if at all possible, rather than trying to
#include "network.h"
#include "quassel.h"
/* We should use openldap on windows if at all possible, rather than trying to
- * write some kind of compatiblity routine.
+ * write some kind of compatib
i
lity routine.
#ifdef Q_CC_MSVC
#include <windows.h>
#include <winldap.h>
#ifdef Q_CC_MSVC
#include <windows.h>
#include <winldap.h>
@@
-241,7
+242,7
@@
bool LdapAuthenticator::ldapAuth(const QString& username, const QString& passwor
LDAPMessage *msg = nullptr, *entry = nullptr;
LDAPMessage *msg = nullptr, *entry = nullptr;
- const QByteArray ldapQuery = "(&(" + uidAttribute + '=' +
username.toLocal8Bit
() + ")" + _filter.toLocal8Bit() + ")";
+ const QByteArray ldapQuery = "(&(" + uidAttribute + '=' +
LdapEscaper::escapeQuery(username).toLatin1
() + ")" + _filter.toLocal8Bit() + ")";
res = ldap_search_ext_s(_connection,
baseDN.constData(),
res = ldap_search_ext_s(_connection,
baseDN.constData(),