Preservation of the original url username on redirections in KIO
adawit at kde.org
Wed Apr 13 22:25:06 BST 2011
I cannot find the reason why we wanted to added code to preserve user
name on redirection in KIO::Job some 9 years ago , but to me it
seems to be an easy fix / workaround for the failings of ioslaves that
do not properly preserve user name when they request redirections.
Unfortunately this gets in the way of the attempt to make it possible
for users to change the user name in the KIO password dialog even
though they have already specified the user name to use as part of the
url they entered into the client application. Here is a specific
example where the above code causes an issue:
1.) User types ftp://firstname.lastname@example.org into konqueror's location bar.
2.) User gets prompted with the password dialog, assume no prior
3.) User changes mind and chooses to login anonymously and so checks
the anonymous checkbox.
4.) User successfully logs in.
Right now the above sequence of actions, or similar ones like it (typo
in user name for example), will result in the user being re-prompted
for password because the original typed url is never updated by the
ftp ioslave! Originally, we used to prevent changing of the user name
from the password dialog if the user name was specified as part of the
URL. However, I guess too many people complained about having to
cancel the login dialog to just fix the user name, the password dialog
was changed without actually understanding the consequence of carrying
out such action.
Anyhow, I decided to address this issue for the ftp ioslave first
because I was working on fixing login related bugs in it. The only
sensible solution I can think of was to use redirection to update the
client about the corrected user name in the url and that seems to work
fine except for the scenario outlined above. For anonymous logins we
want to set the username to null, but the code that attempts to
preserves the original username gets in the way. Hence, I would like
to propose the removal of code that preserves user information from
KIO::Job for KDE 4.7.
Any objections, suggestions ?
More information about the kde-core-devel