]> SAFE projects GIT repository - jmp/mailleur/commitdiff
No authentication on clear chanel
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 4 Jul 2025 10:42:10 +0000 (06:42 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 4 Jul 2025 10:42:10 +0000 (06:42 -0400)
lib/lvleml.c

index 3b52770cd1ed811c8b9ff4502a04ff29b3e7b937..04eb6d672cc41727ffd24866155b1c5d44dc30e5 100644 (file)
@@ -753,10 +753,15 @@ while (proceed==true) {
   //(void) rou_alert(0,"%s JMPDBG phase='%d'",OPEP,phase);
   switch (phase) {
     case 0      :       //are we encrypted and on the right port
+      if (soc_iscrypted(contact->socptr)==false) {
+        (void) transmit(contact,true,"%d 5.7.0 no authentication on clear chanel",
+                                      FAILED);
+        phase=999;      //No need to go further 
+        }
       break;
     case 1      :       //check buffer
       if ((buffer==(char *)0)||(strlen(buffer)==0)) {
-        (void) transmit(contact,true,"%d 5.7.0 Missing auth type",FAILED);
+        (void) transmit(contact,true,"%d 5.7.1 Missing auth type",FAILED);
         phase=999;      //No need to go further 
         }
       break;
@@ -775,7 +780,7 @@ while (proceed==true) {
         }
       if (vocloc[code]==(char *)0) {
         (void) rou_alert(0,"%s auth type <%s> unknown (Bug?)",OPEP,local);
-        (void) transmit(contact,true,"%d 5.7.0 bad authentication type",BADPAR);
+        (void) transmit(contact,true,"%d 5.7.2 bad authentication type",BADPAR);
         phase=999;      //Trouble Trouble
         }
       break;