Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TC does not decode FTP user/password from URL

 
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs Printable version
View previous topic :: View next topic  
Author Message
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2953
Location: Moscow, Russia

PostPosted: Mon Mar 26, 2012 6:30 am    Post subject: TC does not decode FTP user/password from URL Reply with quote

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.51a / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Mon Mar 26, 2012 7:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2953
Location: Moscow, Russia

PostPosted: Mon Mar 26, 2012 7:51 am    Post subject: Reply with quote

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.51a / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Mon Mar 26, 2012 8:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2953
Location: Moscow, Russia

PostPosted: Mon Mar 26, 2012 8:25 am    Post subject: Reply with quote

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.51a / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Fri Mar 30, 2012 4:27 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Flint
Power Member
Power Member


Joined: 27 Oct 2003
Posts: 2953
Location: Moscow, Russia

PostPosted: Fri Mar 30, 2012 6:46 am    Post subject: Reply with quote

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.51a / Win7 x32 & x64 SP1
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Mon Apr 02, 2012 7:23 am    Post subject: Reply with quote

Thanks for trying it!
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC Fixed bugs All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group