X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/eda9c540a9e647cd5455bf4425e5db577bbe4123..417fb317ef06ddb2acee66d28b368319f6b71529:/src/nickserv.c?ds=sidebyside diff --git a/src/nickserv.c b/src/nickserv.c index b2518dc..c9d2e52 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -2127,6 +2127,10 @@ struct handle_info *loc_auth(char *sslfp, char *handle, char *password, char *us handle = hi->handle; } + /* Ensure handle is valid if not found in internal DB */ + if (!hi && (!handle || !is_valid_handle(handle))) + return 0; + #ifdef WITH_LDAP if (nickserv_conf.ldap_enable && (password != NULL)) { ldap_result = ldap_check_auth(handle, password); @@ -5327,8 +5331,9 @@ nickserv_conf_read(void) if(nickserv_conf.ldap_enable > 0) { /* ldap is enabled but not compiled in - error out */ log_module(MAIN_LOG, LOG_ERROR, "ldap is enabled in config, but not compiled in!"); - nickserv_conf.ldap_enable = 0; - sleep(5); + exit(2); + /* nickserv_conf.ldap_enable = 0; */ + /* sleep(5); */ } #endif @@ -5790,7 +5795,7 @@ sasl_packet(struct SASLSession *session) log_module(NS_LOG, LOG_DEBUG, "SASL: Checking supplied credentials"); - if (c != 2) + if ((c != 2) || !(*authcid)) { log_module(NS_LOG, LOG_DEBUG, "SASL: Incomplete credentials supplied"); irc_sasl(session->source, session->uid, "D", "F");