]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Authentication login is working (no leak)
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 8 Jul 2025 20:18:23 +0000 (16:18 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 8 Jul 2025 20:18:23 +0000 (16:18 -0400)
lib/lvleml.c

index 920403f9910c1351dac5e7021631b011c2ab8bec..8b02541ec35875ca9b5beb649713075ab996a9a9 100644 (file)
@@ -463,16 +463,14 @@ if (decoded!=(char *)0) {
 /*      mode, return goodpass  true if successful       */
 /*                                                      */
 /********************************************************/
-static _Bool get_auth_login(CONTYP *contact,char **rmtpass)
+static void get_auth_login(CONTYP *contact,char **rmtpass)
 
 {
 static char *logdat[]={"VXNlcm5hbWU6",  //Username: in B64
                        "UGFzc3dvcmQ6",  //Password: in B64
                        (char *)0};
-_Bool goodpass;
 char local[200];
 
-goodpass=false;
 (void) memset(local,'\000',sizeof(local));
 for (int i=0;i<2;i++) {
    char *line;
@@ -495,8 +493,7 @@ for (int i=0;i<2;i++) {
   line=rou_freestr(line);
   }
 if (strlen(local)>0)
-  goodpass=checklogin(contact,rmtpass,local);
-return goodpass;
+  contact->authenticated=checklogin(contact,rmtpass,local);
 }
 /*
 ^L