Bug 69326

Summary: Ftp authorization faild because of an @ in the user name
Product: [Frameworks and Libraries] kio Reporter: Francesco Facconi <facconi>
Component: ftpAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: finex, raul_kde_bugzilla
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.6.5

Description Francesco Facconi 2003-11-30 10:18:09 UTC
Version:           1.30 (using KDE KDE 3.1.3)
Installed from:    Mandrake RPMs
Compiler:          gcc version 3.3.1 
OS:          Linux

I cannot connect to my ftp server, because the user name contains the @ character, so Krusader, using the user@host form, give me an authorization error.
The result is aaa@bbb@ftp.myhost.com and there it is the error.
With other clients I can connect normally.
Comment 1 Thiago Macieira 2003-11-30 18:27:17 UTC
Escape the @ with %40.
Comment 2 Francesco Facconi 2003-11-30 18:29:25 UTC
It doesn't work... it gives the same error.
Thank you.
Comment 3 FiNeX 2010-09-19 21:08:50 UTC
Is this bug still valid with KDE4? I'm sure, but it could.
Comment 4 Raul Kde Bugzilla 2011-05-10 20:15:11 UTC
same problem with an @ in the password.
withou looking at the code I would guess that kio ftp tries to build a full URL and does not escape the '@'.

kde 4.6.2 on ubuntu 11.04 here.
Comment 5 Dawit Alemayehu 2011-06-15 01:58:04 UTC
Git commit d1101e6dae09c73bbf319061fc229da936c4e4bf by Dawit Alemayehu.
Committed on 10/06/2011 at 22:17.
Pushed by adawit into branch 'KDE/4.6'.

- Removed the regular expression check for IP addresses since QUrl/KUrl now
  correctly parse almost all short url addresses.
- Create the remaining QRegExp checks once instead of on demand.
- Use KUser for username name and directory shortcuts, e.g. ~/, resolution.
- Percent-encoded extra '@' within a URL's username component (Workaround).
- Added unit tests for IPv6 URLs and escaping of '@' in usernames.

BUG: 69326
BUG: 118413
FIXED-IN: 4.6.5
REVIEW: 101576

M  +88   -112  kurifilter-plugins/shorturi/kshorturifilter.cpp     
M  +6    -3    kurifilter-plugins/shorturi/kshorturifilter.h     
M  +15   -4    kurifilter-plugins/tests/kurifiltertest.cpp     

http://commits.kde.org/kde-runtime/d1101e6dae09c73bbf319061fc229da936c4e4bf
Comment 6 Dawit Alemayehu 2011-06-15 01:58:38 UTC
Git commit c67daeb95eaf74928f1cf9dcc2980dd2fb135b4b by Dawit Alemayehu.
Committed on 10/06/2011 at 22:17.
Pushed by adawit into branch 'master'.

- Removed the regular expression check for IP addresses since QUrl/KUrl now
  correctly parse almost all short url addresses.
- Create the remaining QRegExp checks once instead of on demand.
- Use KUser for username name and directory shortcuts, e.g. ~/, resolution.
- Percent-encoded extra '@' within a URL's username component (Workaround).
- Added unit tests for IPv6 URLs and escaping of '@' in usernames.

BUG: 69326
BUG: 118413
FIXED-IN: 4.6.5
REVIEW: 101576

(cherry picked from commit d1101e6dae09c73bbf319061fc229da936c4e4bf)

M  +88   -112  kurifilter-plugins/shorturi/kshorturifilter.cpp     
M  +6    -3    kurifilter-plugins/shorturi/kshorturifilter.h     
M  +15   -4    kurifilter-plugins/tests/kurifiltertest.cpp     

http://commits.kde.org/kde-runtime/c67daeb95eaf74928f1cf9dcc2980dd2fb135b4b