From 7a64d95f7c796d91dbe1250dc1d88ecf8c113610 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 11 Jul 2014 00:22:32 -0400 Subject: Fix Log() calls in m_ldap_oper --- modules/extra/m_ldap_oper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/extra') diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index 3e16d75e6..05579da0b 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -50,7 +50,7 @@ class IdentifyInterface : public LDAPInterface o = new Oper(u->nick, ot); my_opers.insert(o); nc->o = o; - Log(this->owner) << "m_ldap_oper: Tied " << u->nick << " (" << nc->display << ") to opertype " << ot->GetName(); + Log(this->owner) << "Tied " << u->nick << " (" << nc->display << ") to opertype " << ot->GetName(); } } catch (const LDAPException &ex) @@ -64,7 +64,7 @@ class IdentifyInterface : public LDAPInterface } nc->o = NULL; - Log() << "Removed services operator from " << u->nick << " (" << nc->display << ")"; + Log(this->owner) << "Removed services operator from " << u->nick << " (" << nc->display << ")"; } } } -- cgit From 6a3f7c01b1232830f92c8ad6510071852d2abb30 Mon Sep 17 00:00:00 2001 From: DukePyrolator Date: Sun, 14 Sep 2014 11:36:05 +0200 Subject: changed the engine of the chanstats table from InnoDB back to MyISAM to avoid increasing the auto_increment counter on each INSERT IGNORE. For existing tables please manually run 'ALTER TABLE anope_chanstats ENGINE=MyISAM'. --- modules/extra/stats/m_chanstats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/extra') diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 4557b816f..7a2fe0486 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 */ -- cgit From 0cd3bfa24fccea79a5055bcd12d6aa607ecc635e Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 14 Oct 2014 18:58:55 -0400 Subject: Fix module event prioritization which was broken with the newer auto-attach event stuff. Also remove logically dead code from os_defcon, and make os_defcon akill similar masks to os_session when enforcing session akills. Fixes #1618 which relies on os_session to be prioritized before os_defcon. --- modules/extra/m_ldap_authentication.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/extra') diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 115faa73e..01bafac45 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -220,7 +220,10 @@ class NSIdentifyLDAP : public Module { me = this; + } + void Prioritize() anope_override + { ModuleManager::SetPriority(this, PRIORITY_FIRST); } -- cgit From b940077553a538a14519bd11207c96bfd7b5ae4e Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 16 Oct 2014 21:38:46 -0400 Subject: Validate credentials sent via sasl more --- modules/extra/m_sasl_dh-aes.cpp | 2 +- modules/extra/m_sasl_dh-blowfish.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/extra') diff --git a/modules/extra/m_sasl_dh-aes.cpp b/modules/extra/m_sasl_dh-aes.cpp index d556e8502..f398dd45d 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 df55f06ea..c665b5b5f 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(&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(&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); -- cgit From 4fc71bb22f77930885b11182ad34705d1160efc0 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 2 Dec 2014 15:49:14 -0500 Subject: Link m_ldap against ldap_r not ldap --- modules/extra/m_ldap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/extra') diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index dbf7a4aaa..05d54e896 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" -- cgit