[dovecot-cvs] dovecot/src/login client-authenticate.c,1.14,1.15

cras at procontrol.fi cras at procontrol.fi
Wed Nov 13 13:08:20 EET 2002


Update of /home/cvs/dovecot/src/login
In directory danu:/tmp/cvs-serv7219/login

Modified Files:
	client-authenticate.c 
Log Message:
SEARCH CHARSET now works properly with message bodies, and in general body
searching works more correctly by decoding base64/qp data. Non-text MIME
parts are currently not included in search, that could be made optional.
Also the body is parsed separately for each keyword, that could be
optimized.

Changed base64_decode() behaviour so that it can accept non-base64 data as
well, ie. line feeds etc.



Index: client-authenticate.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/client-authenticate.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- client-authenticate.c	6 Nov 2002 14:20:50 -0000	1.14
+++ client-authenticate.c	13 Nov 2002 11:08:18 -0000	1.15
@@ -237,7 +237,7 @@
 {
 	Client *client = context;
 	char *line;
-	ssize_t size;
+	ssize_t size, linelen;
 
 	if (!client_read(client))
 		return;
@@ -251,7 +251,8 @@
 		return;
 	}
 
-	size = base64_decode(line, strlen(line), (unsigned char *) line);
+	linelen = strlen(line);
+	size = base64_decode(line, &linelen, (unsigned char *) line);
 	if (size < 0) {
 		/* failed */
 		client_auth_abort(client, "NO Invalid base64 data");




More information about the dovecot-cvs mailing list