Bug 409740 - KIO-FTP can't connect to some FTP servers with Turkish locale
Summary: KIO-FTP can't connect to some FTP servers with Turkish locale
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: FTP (show other bugs)
Version: 5.59.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-12 10:04 UTC by NXiss7
Modified: 2019-07-21 08:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NXiss7 2019-07-12 10:04:33 UTC
SUMMARY
KIO can't connect to FTP servers created by some applications on Android.

STEPS TO REPRODUCE
1. Start FTP server from Android device (e.g. ES File Manager 3.2.5, had problems with bunch of other applications too).
2. Try to connect to the server using KIO (e.g. Dolphin).

OBSERVED RESULT
You should receive error: "Can't enter directory." with no further explanation.

EXPECTED RESULT
Enter directory without errors.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.16
(available in About System)
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.3
(Bug existed for a very long time, about a year or more at least)

ADDITIONAL INFORMATION
I've fixed the bug, sending patches.
I've been using my fix for about a year and I can confirm that it causes no harm.
Comment 1 NXiss7 2019-07-20 13:52:52 UTC
It turns out that the application ignores the case (using toUpperCase() function of java.lang.String) .
But on Turkish locale, lower-case 'i' converted to upper-case 'İ' instead of 'I' thus client receives "Command not implemented" result.
I assume this bug would cause problems on other servers that run with Turkish locale.
Comment 2 Albert Astals Cid 2019-07-21 08:36:20 UTC
Git commit 94723d1aa7cac4644c26f8b6c433ec1b8ddd86b7 by Albert Astals Cid, on behalf of Enes Selim.
Committed on 21/07/2019 at 08:36.
Pushed by aacid into branch 'master'.

Fix can't enter directory error on some FTP servers with Turkish locale

Summary:
Some Android FTP server applications don't implement lower-case "list" command thus KIO can't connect to server and fail with error "Can't enter directory."
Sending upper-case "LIST" command works.

Edit: It turns out that the application ignores the case (using toUpperCase() function of java.lang.String) .
But on Turkish locale, lower-case 'i' converted to upper-case 'İ' instead of 'I' thus client receives "Command not implemented" result.
I assume this bug would cause problems on other servers that run with Turkish locale.

Test Plan:
1 - Change Android system language to Turkish.
2 - Start FTP server using ES File Manager 3.2.5.
3 - Connect to server using Dolphin.
4 - It should work without errors.

Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Subscribers: dfaure, aacid, svuorela, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D22419

M  +7    -3    src/ioslaves/ftp/ftp.cpp

https://commits.kde.org/kio/94723d1aa7cac4644c26f8b6c433ec1b8ddd86b7