diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-10-12 15:50:20 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-10-12 15:50:20 +0200 |
| commit | f35af507573469b7c1692f01922d323bd1000fbc (patch) | |
| tree | 619e72d4aa486bc97974293cf045f263e98263b6 /UCoreUtils.pas | |
| parent | b417ac914af5e3dfeb27eb5bde6210f88c5b9ec4 (diff) | |
| download | tuxcmd-f35af507573469b7c1692f01922d323bd1000fbc.tar.xz | |
Connection Manager password callback improvements
Diffstat (limited to 'UCoreUtils.pas')
| -rw-r--r-- | UCoreUtils.pas | 7 |
1 files changed, 4 insertions, 3 deletions
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; |
