aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-11-04 07:07:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-11-04 07:07:47 +0800
commite47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea (patch)
tree24ff1cecb8581f42f860002266e97352f597c3cd /camel/camel-url.c
parent0d78f798da6974a4e8d7c591f105438beb4015a2 (diff)
downloadgsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.tar
gsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.tar.gz
gsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.tar.bz2
gsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.tar.lz
gsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.tar.xz
gsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.tar.zst
gsoc2013-evolution-e47b962e0d5e422eaf8ec2ea8bd18cb8996be2ea.zip
Undo my incorrect fix - I misunderstood danw - sorry!
2000-11-03 Jeffrey Stedfast <fejj@helixcode.com> * camel-url.c: Undo my incorrect fix - I misunderstood danw - sorry! svn path=/trunk/; revision=6386
Diffstat (limited to 'camel/camel-url.c')
-rw-r--r--camel/camel-url.c30
1 files changed, 4 insertions, 26 deletions
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, ":/");