Procházet zdrojové kódy

Auto re-key-exchange with the user if fish_paranoid is active and the user already has a FiSH key set (#23)

Bryan Drewery před 14 roky
rodič
revize
68a0da5e64
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      src/mod/server.mod/servmsg.c

+ 7 - 0
src/mod/server.mod/servmsg.c

@@ -762,6 +762,13 @@ static int gotmsg(char *from, char *msg)
         }
         if (doit)
           check_bind_msg(my_code, nick, uhost, my_u, msg);
+
+        if (my_u && FishKeys.contains(nick)) {
+          // FiSH paranoid mode. Invalidate the current key and re-key-exchange with the user.
+          if (fish_paranoid) {
+            keyx(nick);
+          }
+        }
       }
     }
   }