Browse Source

Bug 1449: Long (or multiline) authentication prompts are truncated

https://winscp.net/tracker/1449

Source commit: 3b867b51736b23c0631c6227edcc8486e143a2d0
Martin Prikryl 9 years ago
parent
commit
8d7979c470
2 changed files with 4 additions and 1 deletions
  1. 1 1
      source/core/SecureShell.cpp
  2. 3 0
      source/forms/Authenticate.cpp

+ 1 - 1
source/core/SecureShell.cpp

@@ -797,7 +797,7 @@ bool __fastcall TSecureShell::PromptUser(bool /*ToServer*/,
     TranslatePuttyMessage(InstructionTranslation, 1, Instructions);
   }
 
-  // some servers add leading blank line to make the prompt look prettier
+  // some servers add leading or trailing blank line to make the prompt look prettier
   // on terminal console
   Instructions = Instructions.Trim();
 

+ 3 - 0
source/forms/Authenticate.cpp

@@ -205,6 +205,9 @@ TLabel * __fastcall TAuthenticateForm::GenerateLabel(int Current, UnicodeString
   Result->Caption = Caption;
   int Width = FPromptParent->ClientWidth - FPromptLeft - FPromptRight;
   Result->Width = Width;
+  Result->AutoSize = true;
+  Result->AutoSize = false;
+  Result->Width = Width;
 
   return Result;
 }