summaryrefslogtreecommitdiff
path: root/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra')
-rw-r--r--modules/extra/m_ldap.cpp4
-rw-r--r--modules/extra/m_ldap_authentication.cpp8
-rw-r--r--modules/extra/m_ldap_oper.cpp8
-rw-r--r--modules/extra/m_sasl_dh-aes.cpp2
-rw-r--r--modules/extra/m_sasl_dh-blowfish.cpp4
-rw-r--r--modules/extra/stats/m_chanstats.cpp2
6 files changed, 22 insertions, 6 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index e20b4823e..8309a5cc5 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -1,5 +1,5 @@
-/* RequiredLibraries: ldap,lber */
-/* RequiredWindowsLibraries: libldap,liblber */
+/* RequiredLibraries: ldap_r,lber */
+/* RequiredWindowsLibraries: libldap_r,liblber */
#include "module.h"
#include "modules/ldap.h"
diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp
index 11d825b18..f5b03a606 100644
--- a/modules/extra/m_ldap_authentication.cpp
+++ b/modules/extra/m_ldap_authentication.cpp
@@ -233,6 +233,14 @@ class NSIdentifyLDAP : public Module
{
me = this;
+<<<<<<< HEAD
+=======
+ }
+
+ void Prioritize() anope_override
+ {
+ ModuleManager::SetPriority(this, PRIORITY_FIRST);
+>>>>>>> 2.0
}
void OnReload(Configuration::Conf *config) override
diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp
index a8973fa1e..221e16f98 100644
--- a/modules/extra/m_ldap_oper.cpp
+++ b/modules/extra/m_ldap_oper.cpp
@@ -50,7 +50,11 @@ class IdentifyInterface : public LDAPInterface
o = new Oper(u->nick, ot);
my_opers.insert(o);
nc->o = o;
+<<<<<<< HEAD
Log(this->owner) << "m_ldap_oper: Tied " << u->nick << " (" << nc->GetDisplay() << ") to opertype " << ot->GetName();
+=======
+ Log(this->owner) << "Tied " << u->nick << " (" << nc->display << ") to opertype " << ot->GetName();
+>>>>>>> 2.0
}
}
catch (const LDAPException &ex)
@@ -64,7 +68,11 @@ class IdentifyInterface : public LDAPInterface
}
nc->o = NULL;
+<<<<<<< HEAD
Log() << "Removed services operator from " << u->nick << " (" << nc->GetDisplay() << ")";
+=======
+ Log(this->owner) << "Removed services operator from " << u->nick << " (" << nc->display << ")";
+>>>>>>> 2.0
}
}
}
diff --git a/modules/extra/m_sasl_dh-aes.cpp b/modules/extra/m_sasl_dh-aes.cpp
index 18c0f0e66..dd06d118b 100644
--- a/modules/extra/m_sasl_dh-aes.cpp
+++ b/modules/extra/m_sasl_dh-aes.cpp
@@ -157,7 +157,7 @@ class DHAES : public Mechanism
std::string username = &decrypted[0];
std::string password = &decrypted[username.length() + 1];
- if (username.empty() || password.empty())
+ if (username.empty() || password.empty() || !IRCD->IsNickValid(username) || password.find_first_of("\r\n") != Anope::string::npos)
return Err(sess, pubkey);
SASL::IdentifyRequest* req = new SASL::IdentifyRequest(this->owner, m.source, username, password);
diff --git a/modules/extra/m_sasl_dh-blowfish.cpp b/modules/extra/m_sasl_dh-blowfish.cpp
index bd0fb97db..f6e4b27b3 100644
--- a/modules/extra/m_sasl_dh-blowfish.cpp
+++ b/modules/extra/m_sasl_dh-blowfish.cpp
@@ -152,7 +152,7 @@ class DHBS : public Mechanism
const Anope::string username = reinterpret_cast<const char*>(&data[pos]);
// Check that the username is valid, and that we have at least one block of data
// 2 + 1 + 8 = uint16_t size for keylen, \0 for username, 8 for one block of data
- if (username.empty() || username.length() + keysize + 2 + 1 + 8 > decodedlen)
+ if (username.empty() || username.length() + keysize + 2 + 1 + 8 > decodedlen || !IRCD->IsNickValid(username))
return Err(sess, pubkey);
pos += username.length() + 1;
@@ -167,7 +167,7 @@ class DHBS : public Mechanism
BF_ecb_encrypt(&data[pos + i], reinterpret_cast<unsigned char*>(&decrypted[i]), &BFKey, BF_DECRYPT);
std::string password = &decrypted[0];
- if (password.empty())
+ if (password.empty() || password.find_first_of("\r\n") != Anope::string::npos)
return Err(sess, pubkey);
SASL::IdentifyRequest* req = new SASL::IdentifyRequest(this->owner, m.source, username, password);
diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp
index 331b1480b..0278f7805 100644
--- a/modules/extra/stats/m_chanstats.cpp
+++ b/modules/extra/stats/m_chanstats.cpp
@@ -309,7 +309,7 @@ class MChanstats : public Module
"KEY `nick` (`nick`),"
"KEY `chan_` (`chan`),"
"KEY `type` (`type`)"
- ") ENGINE=InnoDB DEFAULT CHARSET=utf8;";
+ ") ENGINE=MyISAM DEFAULT CHARSET=utf8;";
this->RunQuery(query);
}
/* There is no CREATE OR REPLACE PROCEDURE in MySQL */