From f35af507573469b7c1692f01922d323bd1000fbc Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 12 Oct 2008 15:50:20 +0200 Subject: Connection Manager password callback improvements --- UCoreUtils.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'UCoreUtils.pas') diff --git a/UCoreUtils.pas b/UCoreUtils.pas index 87232d7..bcaa927 100644 --- a/UCoreUtils.pas +++ b/UCoreUtils.pas @@ -115,7 +115,7 @@ procedure GetFirstLastPanelColumn(var FirstColumn, LastColumn: integer); procedure SetupColors; -function ConstructURI(HidePasswd: boolean; Protocol, Server, Username, Password, Dir: string): string; +function ConstructURI(IncludePasswd, HidePasswd: boolean; Protocol, Server, Username, Password, Dir: string): string; function URIHidePassword(const SrcURI: string): string; function StrTotimetDef(const S: string; const Default: time_t): time_t; @@ -1038,14 +1038,15 @@ begin end; (********************************************************************************************************************************) -function ConstructURI(HidePasswd: boolean; Protocol, Server, Username, Password, Dir: string): string; +function ConstructURI(IncludePasswd, HidePasswd: boolean; Protocol, Server, Username, Password, Dir: string): string; begin Result := Protocol + '://'; if Length(Username) > 0 then begin Result := Result + Username; - if Length(Password) > 0 then + if (Length(Password) > 0) and IncludePasswd then begin if HidePasswd then Result := Result + ':' + StringOfChar('*', Length(Password)) else Result := Result + ':' + Password; + end; Result := Result + '@'; end; Result := Result + Server; -- cgit v1.2.3