| View previous topic :: View next topic |
| Author |
Message |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Mon Mar 26, 2012 6:30 am Post subject: TC does not decode FTP user/password from URL |
|
|
1. Press Ctrl+N to initiate a new FTP connection.
2. Enter an FTP address with user and/or password specified directly in the URL, but replace one or more characters with their hex-code representation, like this:
ftp://te%73ter@192.168.0.1
(here the character "s" was replaced with "%73")
3. Set up a Wireshark or some similar tool on the client or the server to watch the real contents of the TCP/IP packets sent.
4. Press OK in the TC dialog.
5. TC sends the username/password exactly in the form they were given by the user (that is without decoding "%73" back into "s"), therefore the server would not accept it.
Some clarification.
According to rfc3986, the userinfo part (which contains username and password, though the latter is now considered deprecated) can be written using the hex-code representation (so-called "pct-encoded"). In particular, it has to be so to allow including special characters. For example, if the password contains a slash character (e.g. "pass/word"), it cannot be written directly, because the URL ftp://tester:pass/word@exacmple.com would mean that "tester:pass" is the host name. And if you replace the slash with its hex form, like in ftp://tester:pass%2Fword@exacmple.com, TC just sends the password exactly as "pass%2Fword", and it is not accepted by the server. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Mon Mar 26, 2012 7:46 am Post subject: |
|
|
Sorry, TC saves the URLs without this encoding, and it also loads them without it. Changing it now would most certainly break many download files. Therefore I will not change it. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Mon Mar 26, 2012 7:51 am Post subject: |
|
|
ghisler(Author)
I don't tell anything about saving or loading. What my report is about is that TC should decode the username and password values when sending them via the USER and PASS commands during establishing FTP connection.
If you are afraid it would break existing connections for some users, you could make an option for it, disabled by default. Slash character in a password is not an imaginary situation, it was reported on one of the Russian forums. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Mon Mar 26, 2012 8:19 am Post subject: |
|
|
What I wanted to say is that would probably break more than it would actually help. If users really want to use slashes in user names, they need to define an ftp connection in Ctrl+F instead of using an URL. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Mon Mar 26, 2012 8:25 am Post subject: |
|
|
| ghisler(Author) wrote: | | What I wanted to say is that would probably break more than it would actually help. |
That's why I suggested to make an option for those who know what they are doing. After all, RFC is not a document to discard so simply… IMHO, of course. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Fri Mar 30, 2012 4:27 am Post subject: |
|
|
OK, I have added it now just for you, please test it!
DecodePercent=1
in wcx_ftp.ini. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2867 Location: Moscow, Russia
|
Posted: Fri Mar 30, 2012 6:46 am Post subject: |
|
|
ghisler(Author)
Thanks! Quick test did not reveal any problems. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24621 Location: Switzerland
|
Posted: Mon Apr 02, 2012 7:23 am Post subject: |
|
|
Thanks for trying it! _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
|