diff --git a/0.74_My_PuTTY/ssh2userauth.c b/0.74_My_PuTTY/ssh2userauth.c index b66e730..7e70a96 100644 --- a/0.74_My_PuTTY/ssh2userauth.c +++ b/0.74_My_PuTTY/ssh2userauth.c @@ -482,7 +482,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) s->username = s->locally_allocated_username = prompt_get_result(s->cur_prompt->prompts[0]); #ifdef MOD_PERSO - SetUsernameInConfig( (char*)s->username ) ; + SetUsernameInConfig( (const char*)s->username ) ; #endif free_prompts(s->cur_prompt); } else { @@ -490,7 +490,6 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) ppl_printf("Using username \"%s\".\r\n", s->username); } s->got_username = true; - /* * Send an authentication request using method "none": (a) * just in case it succeeds, and (b) so that we know what @@ -615,6 +614,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) * prompt (iff we're configured to allow * username change attempts). */ + if (s->type == AUTH_TYPE_NONE) { /* do nothing */ } else if (s->type == AUTH_TYPE_PUBLICKEY_OFFER_LOUD || @@ -849,7 +849,6 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) } else if (s->can_pubkey && s->publickey_blob && s->privatekey_available && !s->tried_pubkey_config) { - ssh2_userkey *key; /* not live over crReturn */ char *passphrase; /* not live over crReturn */ @@ -922,6 +921,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) logevent(NULL,"Test passphrase"); ManagePassPhrase(""); s->userpass_ret = 1 ; + } else #endif s->userpass_ret = seat_get_userpass_input( @@ -1056,7 +1056,6 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) #ifndef NO_GSSAPI } else if (s->can_gssapi && !s->tried_gssapi) { - /* gssapi-with-mic authentication */ ptrlen data; @@ -1255,7 +1254,6 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) continue; #endif } else if (s->can_keyb_inter && !s->kbd_inter_refused) { - /* * Keyboard-interactive authentication. */ @@ -1417,6 +1415,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) * Our prompts_t is fully constructed now. Get the * user's response(s). */ + #ifdef MOD_PERSO if( IsPasswordInConf() ) { GetPasswordInConfig(bufpass) ; @@ -1488,7 +1487,7 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) if(!GetUserPassSSHNoSave()) { if(s!=NULL) if(s->cur_prompt->prompts!=NULL) - if(s->cur_prompt->prompts[i]->result!=NULL) { SetPasswordInConfig( s->cur_prompt->prompts[i]->result ) ; } + if(s->cur_prompt->prompts[i]->result!=NULL) { SetPasswordInConfig( (const char *) s->cur_prompt->prompts[i]->result ) ; } } #endif put_stringz(s->pktout, prompt_get_result_ref( @@ -1527,7 +1526,6 @@ static void ssh2_userauth_process_queue(PacketProtocolLayer *ppl) pq_push_front(s->ppl.in_pq, pktin); } else if (s->can_passwd) { - /* * Plain old password authentication. */ diff --git a/0.74_My_PuTTY/version.h b/0.74_My_PuTTY/version.h index 02bf044..4153671 100644 --- a/0.74_My_PuTTY/version.h +++ b/0.74_My_PuTTY/version.h @@ -1,5 +1,5 @@ #define RELEASE 0.74 #define TEXTVER "Release 0.74" #define SSHVER "-Release-0.74" -#define BINARY_VERSION 0,74,0,6 +#define BINARY_VERSION 0,74,0,7 #define SOURCE_COMMIT "unavailable" diff --git a/0.74_My_PuTTY/windows/version_minor.txt b/0.74_My_PuTTY/windows/version_minor.txt index 1e8b314..7f8f011 100644 --- a/0.74_My_PuTTY/windows/version_minor.txt +++ b/0.74_My_PuTTY/windows/version_minor.txt @@ -1 +1 @@ -6 +7 diff --git a/0.74_My_PuTTY/windows/win_res.rc2 b/0.74_My_PuTTY/windows/win_res.rc2 index 510ee51..3055bca 100644 --- a/0.74_My_PuTTY/windows/win_res.rc2 +++ b/0.74_My_PuTTY/windows/win_res.rc2 @@ -109,7 +109,7 @@ BEGIN PUSHBUTTON "Visit &Web Site", IDA_WEB, 140, 118, 70, 14 EDITTEXT IDA_TEXT, 10, 6, 250, 110, ES_READONLY | ES_MULTILINE | ES_CENTER, WS_EX_STATICEDGE #if (defined MOD_PERSO) && (!defined FLJ) - CTEXT "KiTTY (http://kitty.9bis.com), by 9bis.com", IDA_TEXT2, 10, 26, 194, 16 + CTEXT "KiTTY (https://www.9bis.net/kitty), by 9bis.com", IDA_TEXT2, 10, 26, 194, 16 #endif #if (defined MOD_PERSO) && (defined FLJ) CTEXT "PuTTY", IDA_TEXT2, 10, 26, 194, 16 @@ -218,7 +218,7 @@ BEGIN ICON IDI_MAINICON_0,IDC_STATIC,7,7,30,20 LTEXT "",IDA_VERSION,45,7,198,8 LTEXT "Copyright \251 2005-2020",IDC_STATIC,45,19,78,8 - LTEXT "9bis software - http://kitty.9bis.com", + LTEXT "9bis software - https://www.9bis.net/kitty", IDC_WEBPAGE,45,31,145,8 LTEXT "Contact:",IDC_STATIC,45,43,46,8 LTEXT "kitty@9bis.com",IDC_EMAIL,77,43,83,8 diff --git a/0.74_My_PuTTY/windows/windlg.c b/0.74_My_PuTTY/windows/windlg.c index 17f494d..c1eb725 100644 --- a/0.74_My_PuTTY/windows/windlg.c +++ b/0.74_My_PuTTY/windows/windlg.c @@ -406,8 +406,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, ShellExecute(hwnd,"open","mailto:kitty@9bis.com",NULL,NULL,SW_SHOWNORMAL); } else if (dwId == IDC_WEBPAGE && capture_webpage) { - //ShellExecute(hwnd,"open","http://www.9bis.net/kitty/?zone=en",NULL,NULL,SW_SHOWNORMAL); - ShellExecute(hwnd,"open","http://kitty.9bis.com",NULL,NULL,SW_SHOWNORMAL); + ShellExecute(hwnd,"open","https://www.9bis.net/kitty",NULL,NULL,SW_SHOWNORMAL); } capture_email = FALSE; capture_webpage = FALSE; @@ -445,14 +444,14 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, for( i = 0 ; i < strlen( vers ) ; i ++ ) { if( !(((vers[i]>='0')&&(vers[i]<='9'))||(vers[i]=='.')) ) { vers[i] = '\0' ; break ; } } - sprintf( buffer, "http://www.9bis.net/kitty/check_update.php?version=%s", vers ) ; + sprintf( buffer, "https://www.9bis.net/kitty/check_update.php?version=%s", vers ) ; ShellExecute(hwnd, "open", buffer, 0, 0, SW_SHOWDEFAULT); }*/ return 0; case IDA_DON: /* Load web browser */ { char buffer[1024]=""; - sprintf( buffer, "http://kitty.9bis.com/?page=Donation&zone=en" ) ; + sprintf( buffer, "https://www.9bis.net/kitty/#!pages/donation.md" ) ; ShellExecute(hwnd, "open", buffer, 0, 0, SW_SHOWDEFAULT); } return 0; diff --git a/0.74_My_PuTTY/windows/window.c b/0.74_My_PuTTY/windows/window.c index 9a11d4c..a1b2913 100644 --- a/0.74_My_PuTTY/windows/window.c +++ b/0.74_My_PuTTY/windows/window.c @@ -7254,7 +7254,6 @@ void set_title_internal(TermWin *tw, const char *title) { SetWindowText(hwnd, title); } - /* Creer un titre de fenetre a partir d'un schema donne %%f: le folder auquel apprtient le session %%h: le hostname diff --git a/kitty.c b/kitty.c index 037ba6a..14686d0 100644 --- a/kitty.c +++ b/kitty.c @@ -978,13 +978,16 @@ void SetPasswordInConfig( const char * password ) { } } -void SetUsernameInConfig( char * username ) { +void SetUsernameInConfig( const char * username ) { int len ; if( (!GetUserPassSSHNoSave())&&(username!=NULL) ) { len = strlen( username ) ; - if( len > 126 ) len = 126 ; - username[len] = '\0' ; - conf_set_str(conf,CONF_username,username); + if( len > 126 ) { len = 126 ; } + char *b = (char*) malloc( len+1 ) ; + memcpy( (void*)b, (const void*)username, len+1 ) ; + b[len] = '\0' ; + conf_set_str(conf,CONF_username,b); + free(b); } } diff --git a/kitty_commun.c b/kitty_commun.c index 260fa7e..5de3a3c 100644 --- a/kitty_commun.c +++ b/kitty_commun.c @@ -376,7 +376,9 @@ void GetPasswordInConfig( char * p ) { if( strlen(conf_get_str(conf,CONF_password)) == 0 ) return ; /* On decrypte le password */ char bufpass[4096] ; - memcpy( bufpass, conf_get_str(conf,CONF_password), 4095 ) ; bufpass[4095]='\0'; + int len = strlen( conf_get_str(conf,CONF_password) ) ; + if( len>4095 ) { len = 4095 ; } + memcpy( bufpass, conf_get_str(conf,CONF_password), len ) ; bufpass[len]='\0'; MASKPASS(bufpass); memcpy( p, bufpass, strlen(bufpass)+1 ) ; memset(bufpass,0,strlen(bufpass)); @@ -387,7 +389,10 @@ int IsPasswordInConf(void) { if( strlen(conf_get_str(conf,CONF_password)) == 0 ) return 0 ; /* On decrypte le password */ char bufpass[4096] ; - memcpy( bufpass, conf_get_str(conf,CONF_password), 4095 ) ; bufpass[4095]='\0'; + len = strlen( conf_get_str(conf,CONF_password) ) ; + if( len>4095 ) { len = 4095 ; } + memcpy( bufpass, conf_get_str(conf,CONF_password), len ) ; + bufpass[len]='\0'; MASKPASS(bufpass); len = strlen( bufpass ) ; memset(bufpass,0,strlen(bufpass)); diff --git a/kitty_crypt.c b/kitty_crypt.c index e654cd1..4cd64e9 100644 --- a/kitty_crypt.c +++ b/kitty_crypt.c @@ -13,7 +13,6 @@ int decryptstring( char * st, const char * key ) { static char MASKKEY[128] = "¤¥©ª³¼½¾" ; void MASKPASS( char * password ) { - //return ; // POUR SIMPLIFIER EN ATTENDANT QUE TOUT FONCTIONNE DANS LA MISE A JOUR > 2013/06/27 if( password==NULL ) return ; if( strlen(password)==0) return ;