Review Request: Do not preserve username information on redirection in KIO

Dawit Alemayehu adawit at kde.org
Thu Apr 21 15:00:34 BST 2011



> On April 21, 2011, 8:18 a.m., David Faure wrote:
> > No objections, although I don't have the big picture about this.

Its main purpose is to make the scenario below possible as part of the ftp login fixes I am working on under https://git.reviewboard.kde.org/r/100873/

1.) User enters a ftp url, ftp://foo@foobar.com
2.) Gets prompted to enter the password by kio_ftp.
3.) Changes mind and clicks on the "Anonymous" check box and presses OK.

Now the user name in the client needs to be updated to blank since the user chose to login anonymously. That is what this patch makes possible. It allows us to send a redirected without any user name, even though the original typed-in url contained one. Hope that clarifies things.


- Dawit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101153/#review2799
-----------------------------------------------------------


On April 21, 2011, 2:50 a.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101153/
> -----------------------------------------------------------
> 
> (Updated April 21, 2011, 2:50 a.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Summary
> -------
> 
> This patch completely removes the automatic restoration of the user name from the original url to the redirection url at the job level. Even though I tried to lookup why this was done a long time ago, I have not been able to decipher the reason behind it. I could only guess that it was probably done as a workaround for the deficiencies of some unknown ioslave that was not doing the right thing when constructing the redirection url.
> 
> Unfortunately this has now come in full circle to cause problems when attempting to fix kio_ftp's login related bug reports. Namely I wanted to fix the problem where the user typed a username as part of the ftp url and later on either changed it or choose to login anonymously when prompted with a password dialog. Right now the client never gets updated even when the user chose to use a different username in the password dialog. IOW, the username reflected in the typed-in url is different from the one the user used to login. You can guess what happens when the user then clicks on a folder or file after logging in.
> 
> The process I chose to use to update the client is to cause a redirection and that works fine so long as the redirection url contains a proper username. Otherwise, the redirection handling slots in KIO::Job automatically re-insert the username from the old url into the new redirection url.
> 
> 
> Diffs
> -----
> 
>   kio/kio/job.cpp 004b4c9 
> 
> Diff: http://git.reviewboard.kde.org/r/101153/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dawit
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110421/baf7ceed/attachment.htm>


More information about the kde-core-devel mailing list