diff --git a/doc/changes.md b/doc/changes.md index 3691ff85..a10bf582 100644 --- a/doc/changes.md +++ b/doc/changes.md @@ -152,6 +152,9 @@ by OpenSSH on modern versions of windows, add the command * Fixed emacs turning off mouse reporting when started * Fixed K95G hanging when closing the window or using File->Exit with when a connection is active and GUI dialogs are turned off +* Fixed K95 bug 797: Dialer generated connection scripts will no longer include + `SET LOGIN PROMPT` or `SET LOGIN PASSWORD` commands if those fields do not + have a value as this broke the use of the standard login.ksc script. ### Other Source Changes * Fixed a selection of build warnings, and improved compatibility with the diff --git a/kermit/dialer/kconnect.cpp b/kermit/dialer/kconnect.cpp index 45e0ca42..47a8144f 100644 --- a/kermit/dialer/kconnect.cpp +++ b/kermit/dialer/kconnect.cpp @@ -6166,10 +6166,12 @@ GenerateScript( KD_LIST_ITEM * entry, KD_CONFIG * config, int anonymous = !stricmp(entry->_userid,"anonymous") || !stricmp(entry->_userid,"ftp"); - if ( entry->_password && !anonymous ) { - if ( !entry->_prompt_for_password ) - sprintf(tmp, "set login password {%s}", entry->_password ); - else { + if ( entry->_password + && (strlen(entry->_password) > 0 || entry->_prompt_for_password) + && !anonymous ) { + if ( !entry->_prompt_for_password ) { + sprintf(tmp, "set login password {%s}", entry->_password); + } else { /* Prompt for Password */ ZIL_ICHAR password[PASSWD_SZ]; ZIL_UINT8 ok=0; @@ -6188,7 +6190,7 @@ GenerateScript( KD_LIST_ITEM * entry, KD_CONFIG * config, OUTFILE(BuildOutStr(buf, "", tmp)); OUTFILE("set command quoting on\n"); } - if ( entry->_prompt ) { + if ( entry->_prompt && strlen(entry->_prompt) > 0) { sprintf(tmp, "set login prompt {%s}", entry->_prompt); OUTFILE(BuildOutStr(buf, "", tmp)); }