Review Request: Patch for "FTP ioslave unnecessarily asks for password"

Dawit Alemayehu adawit at kde.org
Tue Apr 12 20:03:42 BST 2011



> On April 12, 2011, 9:22 a.m., David Faure wrote:
> > Thanks, looks good to me. I do think that if I have a stored login/password for an ftp site, then I don't want to get an anonymous login when I go back there again, typically one can access more stuff with authenticated login. This raises the question of how to test anonymous login on a site with cached auth though -- well, there's always the option of renaming stuff in kwalletmanager ;)

Actually the "corrected patch" I posted does not correctly deal with the problem if there is username in the typed-in ftp url. As such, the check for cached authentication should be done before everything else to ensure that stored credentials are used regardless of the presence or absence of username in the ftp url.

Of course this patch does not solve the larger issue you raised above. I personally the best way to address almost all of the ills in kio_ftp's login procedures is to simplify its behavior along the following lines:

#1. When no username is present in the ftp url and the anonymous login fails, instead of prompting the user, simply fail and send an error message telling the user why the login failed and how it can be rectified.

#2. When a username is present in the ftp url, then attempt to login in with cached info if available. If not, prompt the user.

#3. When a username is present in the ftp url, but it is incorrect due to a typo or other issues, the follow the steps in #2. If the user then corrects the username, request a redirection in order to notify the client of the username change in the ftp url.

This would fix the issue you raised above by explicitly requiring the user to type a username if he/she wants to login into a given ftp site with own credentials. Otherwise, kio_ftp will always login anonymously and return error when such attempt fails. Simple and to the point. If the harshness of #1 is not acceptable, then the same approach as #3 can be used when anonymous login fails. Ask for the login credentials, login and send a redirection request to update the client's url.


- Dawit


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


On March 19, 2011, 4:37 a.m., Dawit Alemayehu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100873/
> -----------------------------------------------------------
> 
> (Updated March 19, 2011, 4:37 a.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> The attached patch forces kio_ftp to first look up for cached password before showing the user a prompt to enter password information. This addresses the issue mentioned in 143488 and makes kio_ftp's behavior consistent with the other ioslaves.
> 
> 
> This addresses bugs 124675 and 143488.
>     http://bugs.kde.org/show_bug.cgi?id=124675
>     http://bugs.kde.org/show_bug.cgi?id=143488
> 
> 
> Diffs
> -----
> 
>   kioslave/ftp/ftp.cpp 95c4450 
> 
> Diff: http://git.reviewboard.kde.org/r/100873/diff
> 
> 
> Testing
> -------
> 
> Login to an ftp site, save the password and visit the same site again. No prompt.
> 
> 
> Thanks,
> 
> Dawit
> 
>

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


More information about the kde-core-devel mailing list