From 140ab8b26adefd427fedfc32aadf46f47f7f4019 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 1 Oct 2009 23:38:59 +0200 Subject: Peoperly escape username and password in URI This prevent parsing issues and confusion with separators Fixes bugs #2454128 and #2808177 --- UConnectionProperties.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'UConnectionProperties.pas') diff --git a/UConnectionProperties.pas b/UConnectionProperties.pas index 99dbf9a..9899585 100644 --- a/UConnectionProperties.pas +++ b/UConnectionProperties.pas @@ -287,10 +287,10 @@ begin if Pos(':', s2) > 0 then begin s := Copy(s2, Pos(':', s2) + 1, Length(s2) - Pos(':', s2)); if s = '' then PasswordEntry.Text := '' else - if Pos('*', s) <= 0 then PasswordEntry.Text := s; + if Pos('*', s) <= 0 then PasswordEntry.Text := UnEscapeURI(s); Delete(s2, Pos(':', s2), Length(s2) - Pos(':', s2) + 1); end else PasswordEntry.Text := ''; - UserNameEntry.Text := s2; + UserNameEntry.Text := UnEscapeURI(s2); end else ServerEntry.Text := s2; CurrentURI := MakeURI(False); -- cgit v1.2.3