mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Merge branch '2833_url_port_in_history' into 4.8.1-stable
* 2833_url_port_in_history: Ticket #2833: url with port was stored wrong in history.
This commit is contained in:
commit
a6a0d29f7f
@ -227,6 +227,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
Block a user