diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <fejj@helixcode.com> + + * camel-url.c: Undo my incorrect fix - I misunderstood danw - + sorry! + 2000-11-03 Dan Winship <danw@helixcode.com> * 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, ":/"); |