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);
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
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");