Only check passwords on user ports.
[ircu2.10.12-pk.git] / ircd / s_auth.c
index fdefd97443f8e982b45a74fcc5405ccb544709d1..34baf898e7d98b6d45f45c94635ef2fc7f94d4e6 100644 (file)
@@ -383,12 +383,14 @@ static int check_auth_finished(struct AuthRequest *auth)
    * as possible so that iauth's challenge/response (which uses PASS
    * for responses) is not confused with the client's password.
    */
-  if (!FlagHas(&auth->flags, AR_PASSWORD_CHECKED))
+  if (IsUserPort(auth->client)
+      && !FlagHas(&auth->flags, AR_PASSWORD_CHECKED))
   {
     struct ConfItem *aconf;
 
     aconf = cli_confs(auth->client)->value.aconf;
-    if (!EmptyString(aconf->passwd)
+    if (aconf
+        && !EmptyString(aconf->passwd)
         && strcmp(cli_passwd(auth->client), aconf->passwd))
     {
       ServerStats->is_ref++;