From 46617228fa57236a16310396422453761e9dae7f Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Mon, 14 Jan 2002 05:26:16 -0800
Subject: [PATCH] [svn] URL-decode user and password in URL. Published in
 <sxsita52hg6.fsf@florida.arsdigita.de>.

---
 src/ChangeLog | 4 ++++
 src/url.c     | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index 47272eee..f75634a3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-14  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+	* url.c (parse_uname): URL-decode *USER and *PASSWD.
+
 2002-01-07  Ian Abbott <abbotti@mev.co.uk>
 
 	* url.c (uri_merge_1): Deal with "net path" relative URL (one that
diff --git a/src/url.c b/src/url.c
index 7a44a805..ac9eba0f 100644
--- a/src/url.c
+++ b/src/url.c
@@ -528,6 +528,11 @@ parse_uname (const char *str, int len, char **user, char **passwd)
   memcpy (*user, str, len);
   (*user)[len] = '\0';
 
+  if (*user)
+    decode_string (*user);
+  if (*passwd)
+    decode_string (*passwd);
+
   return 1;
 }