From e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 3 Nov 2000 23:07:47 +0000 Subject: Undo my incorrect fix - I misunderstood danw - sorry! 2000-11-03 Jeffrey Stedfast * camel-url.c: Undo my incorrect fix - I misunderstood danw - sorry! svn path=/trunk/; revision=6386 --- camel/ChangeLog | 5 +++++ camel/camel-url.c | 30 ++++-------------------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 0aa606f314..7604681a96 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2000-11-03 Jeffrey Stedfast + + * camel-url.c: Undo my incorrect fix - I misunderstood danw - + sorry! + 2000-11-03 Dan Winship * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge): diff --git a/camel/camel-url.c b/camel/camel-url.c index f78a4cefc2..18575782dc 100644 --- a/camel/camel-url.c +++ b/camel/camel-url.c @@ -116,19 +116,8 @@ camel_url_new (const char *url_string, CamelException *ex) if (at && (!slash || at < slash)) { colon = strchr (url_string, ':'); if (colon && colon < at) { - /* assume password is base64 encoded */ - int state = 0; int save = 0; - char *passwd; - int len; - - passwd = g_strndup (colon + 1, at - colon - 1); - camel_url_decode (passwd); - - len = strlen (passwd); - url->passwd = g_malloc (len); - len = base64_decode_step (passwd, len, url->passwd, &state, &save); - - url->passwd[len] = '\0'; + url->passwd = g_strndup (colon + 1, at - colon - 1); + camel_url_decode (url->passwd); } else { url->passwd = NULL; colon = at; @@ -199,19 +188,8 @@ camel_url_to_string (CamelURL *url, gboolean show_passwd) if (url->authmech) authmech = camel_url_encode (url->authmech, TRUE, ":@/"); - if (show_passwd && url->passwd) { - int state = 0, save = 0; - int len; - char *pass; - - len = strlen (url->passwd); - pass = g_malloc ((int)(len * 4 / 3) + 4); - len = base64_encode_close (url->passwd, len, FALSE, pass, &state, &save); - pass[len] = '\0'; - - passwd = camel_url_encode (pass, TRUE, "/"); - g_free (pass); - } + if (show_passwd && url->passwd) + passwd = camel_url_encode (url->passwd, TRUE, "@/"); if (url->host) host = camel_url_encode (url->host, TRUE, ":/"); -- cgit v1.2.3