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:
Andrew Borodin 2012-06-20 15:59:36 +04:00
commit a6a0d29f7f

View File

@ -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';