mirror of https://github.com/MidnightCommander/mc
Merge branch '2833_url_port_in_history'
* 2833_url_port_in_history: Ticket #2833: url with port was stored wrong in history.
This commit is contained in:
commit
c654147913
|
@ -233,6 +233,11 @@ input_history_strip_password (char *url)
|
|||
else
|
||||
colon = strchr (url, ':');
|
||||
|
||||
/* if 'colon' before 'at', 'colon' delimits user and password: user:password@host */
|
||||
/* if 'colon' after 'at', 'colon' delimits host and port: user@host:port */
|
||||
if (colon != NULL && colon > at)
|
||||
colon = NULL;
|
||||
|
||||
if (colon == NULL)
|
||||
return g_strdup (url);
|
||||
*colon = '\0';
|
||||
|
|
Loading…
Reference in New Issue