changeset 3309:6e876221ec82

[gaim-migrate @ 3327] Can now have reserved chars in IM and proxy passwords. (Ref: bug I.D. [ 555752 ] Proxy pass socks and } character) committer: Tailor Script <tailor@pidgin.im>
author Jim Seymour <jseymour>
date Sat, 15 Jun 2002 15:43:03 +0000
parents daf97db3b28e
children 3d20b3e7f840
files src/gaimrc.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaimrc.c	Sat Jun 15 03:30:33 2002 +0000
+++ b/src/gaimrc.c	Sat Jun 15 15:43:03 2002 +0000
@@ -555,10 +555,13 @@
 {
 	char *c;
 	int nl = 1, i;
-	if (u->options & OPT_USR_REM_PASS)
-		fprintf(f, "\t\tident { %s } { %s }\n", u->username, u->password);
-	else
+
+	if (u->options & OPT_USR_REM_PASS) {
+		fprintf(f, "\t\tident { %s } { %s }\n", u->username, (c = escape_text2(u->password)));
+		free(c);
+	} else {
 		fprintf(f, "\t\tident { %s } {  }\n", u->username);
+	}
 	fprintf(f, "\t\tuser_info {");
 	c = u->user_info;
 	while (*c) {
@@ -972,12 +975,15 @@
 
 static void gaimrc_write_proxy(FILE *f)
 {
+	char *str;
+
 	fprintf(f, "proxy {\n");
 	fprintf(f, "\thost { %s }\n", proxyhost);
 	fprintf(f, "\tport { %d }\n", proxyport);
 	fprintf(f, "\ttype { %d }\n", proxytype);
 	fprintf(f, "\tuser { %s }\n", proxyuser);
-	fprintf(f, "\tpass { %s }\n", proxypass);
+	fprintf(f, "\tpass { %s }\n", (str = escape_text2(proxypass)));
+	free(str);
 	fprintf(f, "}\n");
 }