[evolution-patches] connector 1.4 patch for E2k3SP1 support



This fixes the forms-based-auth brokenness in connector 1.4 when used
against Exchange 2003 Service Pack 1.


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.1.1.1.2.6
diff -u -r1.1.1.1.2.6 ChangeLog
--- ChangeLog	7 Jul 2004 02:19:18 -0000	1.1.1.1.2.6
+++ ChangeLog	5 Aug 2004 17:29:17 -0000
@@ -1,3 +1,31 @@
+2004-08-05  Dan Winship  <danw novell com>
+
+	* configure.in: bump version to 1.4.7.3
+
+	* NEWS: Update
+
+2004-08-05  Dan Winship  <danw novell com>
+
+	* lib/e2k-uri.c (e2k_uri_append_encoded, e2k_uri_encode): add a
+	"wss_encode" flag, saying whether or not to use the Web Storage
+	System URI-encoding rules ("/" becomes "_xF8FF_", etc), since some
+	places don't want them.
+
+	* lib/e2k-context.c (e2k_context_fba): Don't put multiple &s
+	between flags, and use "normal" URI encoding rules without the
+	extra goofy WSS rules. Fixes FBA to E2k3 SP1.
+	(e2k_context_put_new, e2k_context_proppatch_new): Set wss_encode
+	flag to e2k_uri_encode
+
+	* lib/e2k-autoconfig.c (set_account_uri_string): Update for
+	e2k_uri_append_encoded changes
+
+	* lib/e2k-freebusy.c (fb_uri_for_dn): Likewise
+
+	* storage/exchange-account.c (exchange_account_new): Likewise
+
+	* storage/exchange-oof.c (exchange_oof_set): Likewise
+
 2004-07-07  Harry Lu  <harry lu sun com>
 
 	Fix for a crash.
Index: NEWS
===================================================================
RCS file: /cvs/gnome/evolution-exchange/NEWS,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 NEWS
--- NEWS	11 May 2004 15:09:03 -0000	1.1.1.1
+++ NEWS	5 Aug 2004 17:29:17 -0000
@@ -1,4 +1,13 @@
-Changes to Ximian Connector between 1.4.6 and 1.4.7
+Changes to Ximian Connector between 1.4.7 and 1.4.7.3
+
+	* Fixed LDAP-related build problems (1.4.7.1)
+
+	* Fixed access to Tasks folders on certain distros (1.4.7.2)
+
+	* Fixed forms-based authentication to work properly with
+	  Exchange 2003 Service Pack 1. (1.4.7.3)
+
+Changes between 1.4.6 and 1.4.7
 
 	* (Initial open source release)
 
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution-exchange/configure.in,v
retrieving revision 1.1.1.1.2.3
diff -u -r1.1.1.1.2.3 configure.in
--- configure.in	18 May 2004 15:16:34 -0000	1.1.1.1.2.3
+++ configure.in	5 Aug 2004 17:29:17 -0000
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
 
-AC_INIT(ximian-connector, 1.4.7.2, http://bugzilla.ximian.com/enter_bug.cgi?product=Evolution)
+AC_INIT(ximian-connector, 1.4.7.3, http://bugzilla.ximian.com/enter_bug.cgi?product=Evolution)
 AC_CONFIG_SRCDIR(storage)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
Index: addressbook/pas-backend-exchange.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/addressbook/Attic/pas-backend-exchange.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pas-backend-exchange.c
--- addressbook/pas-backend-exchange.c	11 May 2004 15:09:04 -0000	1.1.1.1
+++ addressbook/pas-backend-exchange.c	5 Aug 2004 17:29:18 -0000
@@ -1331,7 +1331,7 @@
 
 	folder_uri = e_folder_exchange_get_internal_uri (bepriv->folder);
 
-	contact_name_enc = e2k_uri_encode (name, NULL);
+	contact_name_enc = e2k_uri_encode (name, TRUE, NULL);
 	contact_basename = e2k_uri_concat (folder_uri, contact_name_enc);
 	g_free (contact_name_enc);
 
Index: lib/e2k-autoconfig.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/e2k-autoconfig.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 e2k-autoconfig.c
--- lib/e2k-autoconfig.c	11 May 2004 15:09:03 -0000	1.1.1.1
+++ lib/e2k-autoconfig.c	5 Aug 2004 17:29:18 -0000
@@ -840,16 +840,16 @@
 
 	uri = g_string_new ("exchange://");
 	if (ac->nt_domain && (!ac->use_ntlm || !ac->nt_domain_defaulted)) {
-		e2k_uri_append_encoded (uri, ac->nt_domain, "\\;:@/");
+		e2k_uri_append_encoded (uri, ac->nt_domain, FALSE, "\\;:@/");
 		g_string_append_c (uri, '\\');
 	}
-	e2k_uri_append_encoded (uri, ac->username, ";:@/");
+	e2k_uri_append_encoded (uri, ac->username, FALSE, ";:@/");
 
 	if (!ac->use_ntlm)
 		g_string_append (uri, ";auth=Basic");
 
 	g_string_append_c (uri, '@');
-	e2k_uri_append_encoded (uri, owa_uri->host, ":/");
+	e2k_uri_append_encoded (uri, owa_uri->host, FALSE, ":/");
 	if (owa_uri->port)
 		g_string_append_printf (uri, ":%d", owa_uri->port);
 	g_string_append_c (uri, '/');
@@ -857,7 +857,7 @@
 	if (!strcmp (owa_uri->protocol, "https"))
 		g_string_append (uri, ";use_ssl=always");
 	g_string_append (uri, ";ad_server=");
-	e2k_uri_append_encoded (uri, ac->gc_server, ";?");
+	e2k_uri_append_encoded (uri, ac->gc_server, FALSE, ";?");
 	if (ac->ad_limit) {
 		g_string_append_printf (uri, ";ad_limit=%d",
 					atoi (ac->ad_limit));
@@ -872,14 +872,14 @@
 	if (mailbox) {
 		*mailbox++ = '\0';
 		g_string_append (uri, ";mailbox=");
-		e2k_uri_append_encoded (uri, mailbox, ";?");
+		e2k_uri_append_encoded (uri, mailbox, FALSE, ";?");
 	}
 	g_string_append (uri, ";owa_path=/");
-	e2k_uri_append_encoded (uri, path, ";?");
+	e2k_uri_append_encoded (uri, path, FALSE, ";?");
 	g_free (path);
 
 	g_string_append (uri, ";pf_server=");
-	e2k_uri_append_encoded (uri, ac->pf_server ? ac->pf_server : home_uri->host, ";?");
+	e2k_uri_append_encoded (uri, ac->pf_server ? ac->pf_server : home_uri->host, FALSE, ";?");
 
 	ac->account_uri = uri->str;
 	ac->exchange_server = g_strdup (home_uri->host);
Index: lib/e2k-connection.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/Attic/e2k-connection.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 e2k-connection.c
--- lib/e2k-connection.c	11 May 2004 15:09:03 -0000	1.1.1.1
+++ lib/e2k-connection.c	5 Aug 2004 17:29:18 -0000
@@ -573,31 +573,30 @@
 			continue;
 		value = xmlGetProp (node, "value");
 
-		if (form_body->len > 0)
-			g_string_append_c (form_body, '&');
-
 		if (!g_ascii_strcasecmp (name, "destination") && value) {
 			g_string_append (form_body, name);
 			g_string_append_c (form_body, '=');
-			e2k_uri_append_encoded (form_body, value, NULL);
+			e2k_uri_append_encoded (form_body, value, FALSE, NULL);
+			g_string_append_c (form_body, '&');
 		} else if (!g_ascii_strcasecmp (name, "flags")) {
 			g_string_append_printf (form_body, "flags=%d",
 						E2K_FBA_FLAG_TRUSTED);
+			g_string_append_c (form_body, '&');
 		} else if (!g_ascii_strcasecmp (name, "username")) {
 			g_string_append (form_body, "username=");
-			e2k_uri_append_encoded (form_body, conn->priv->suri->user, NULL);
+			e2k_uri_append_encoded (form_body, conn->priv->suri->user, FALSE, NULL);
+			g_string_append_c (form_body, '&');
 		} else if (!g_ascii_strcasecmp (name, "password")) {
 			g_string_append (form_body, "password=");
-			e2k_uri_append_encoded (form_body, conn->priv->suri->passwd, NULL);
-		} else if (!g_ascii_strcasecmp (name, "trusted")) {
-			g_string_append_printf (form_body, "trusted=%d",
-						E2K_FBA_FLAG_TRUSTED);
+			e2k_uri_append_encoded (form_body, conn->priv->suri->passwd, FALSE, NULL);
+			g_string_append_c (form_body, '&');
 		}
 
 		if (value)
 			xmlFree (value);
 		xmlFree (name);
 	}
+	g_string_append_printf (form_body, "trusted=%d", E2K_FBA_FLAG_TRUSTED);
 	xmlFreeDoc (doc);
 	doc = NULL;
 
@@ -1344,7 +1343,7 @@
 				     callback (conn, &error_message, user_data));
 
 	append_data = g_new (E2kAppendData, 1);
-	append_data->object_name = e2k_uri_encode (object_name, NULL);
+	append_data->object_name = e2k_uri_encode (object_name, TRUE, NULL);
 	append_data->count = 0;
 
 	append_data->body = g_memdup (body, length);
Index: lib/e2k-freebusy.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/e2k-freebusy.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 e2k-freebusy.c
--- lib/e2k-freebusy.c	11 May 2004 15:09:03 -0000	1.1.1.1
+++ lib/e2k-freebusy.c	5 Aug 2004 17:29:18 -0000
@@ -69,9 +69,9 @@
 
 	str = g_string_new (public_uri);
 	g_string_append (str, "/NON_IPM_SUBTREE/SCHEDULE%2B%20FREE%20BUSY/EX:");
-	e2k_uri_append_encoded (str, org, NULL);
+	e2k_uri_append_encoded (str, org, TRUE, NULL);
 	g_string_append (str, "/USER-");
-	e2k_uri_append_encoded (str, div, NULL);
+	e2k_uri_append_encoded (str, div, TRUE, NULL);
 	g_string_append (str, ".EML");
 
 	uri = str->str;
Index: lib/e2k-uri.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/e2k-uri.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 e2k-uri.c
--- lib/e2k-uri.c	11 May 2004 15:09:03 -0000	1.1.1.1
+++ lib/e2k-uri.c	5 Aug 2004 17:29:18 -0000
@@ -247,7 +247,8 @@
 };
 
 void
-e2k_uri_append_encoded (GString *str, const char *in, const char *extra_enc_chars)
+e2k_uri_append_encoded (GString *str, const char *in,
+			gboolean wss_encode, const char *extra_enc_chars)
 {
 	const unsigned char *s = (const unsigned char *)in;
 
@@ -256,6 +257,8 @@
 			goto escape;
 		switch (uri_encoded_char[*s]) {
 		case 2:
+			if (!wss_encode)
+				goto escape;
 			switch (*s++) {
 			case '/':
 				g_string_append (str, "_xF8FF_");
@@ -283,13 +286,14 @@
 }
 
 char *
-e2k_uri_encode (const char *in, const char *extra_enc_chars)
+e2k_uri_encode (const char *in, gboolean wss_encode,
+		const char *extra_enc_chars)
 {
 	GString *string;
 	char *out;
 
 	string = g_string_new (NULL);
-	e2k_uri_append_encoded (string, in, extra_enc_chars);
+	e2k_uri_append_encoded (string, in, wss_encode, extra_enc_chars);
 	out = string->str;
 	g_string_free (string, FALSE);
 
Index: lib/e2k-uri.h
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/e2k-uri.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 e2k-uri.h
--- lib/e2k-uri.h	11 May 2004 15:09:03 -0000	1.1.1.1
+++ lib/e2k-uri.h	5 Aug 2004 17:29:18 -0000
@@ -27,9 +27,11 @@
 
 void        e2k_uri_decode         (char *part);
 char *      e2k_uri_encode         (const char *in,
+				    gboolean    wss_encoding,
 				    const char *extra_enc_chars);
 void        e2k_uri_append_encoded (GString    *str,
 				    const char *in,
+				    gboolean    wss_encoding,
 				    const char *extra_enc_chars);
 
 const char *e2k_uri_path      (const char *uri_string);
Index: storage/exchange-account.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-account.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 exchange-account.c
--- storage/exchange-account.c	11 May 2004 15:09:04 -0000	1.1.1.1
+++ storage/exchange-account.c	5 Aug 2004 17:29:18 -0000
@@ -1503,7 +1503,7 @@
 	account->priv->identity_email = g_strdup (adata->id->address);
 
 	/* URI, etc, info */
-	enc_user = e2k_uri_encode (uri->user, "@/;:");
+	enc_user = e2k_uri_encode (uri->user, FALSE, "@/;:");
 	account->priv->uri_authority = g_strdup_printf ("%s %s", enc_user,
 							uri->host);
 	g_free (enc_user);
@@ -1553,7 +1553,7 @@
 		param = uri->user;
 	else if (!g_ascii_strncasecmp (param, account->priv->identity_email, strlen (param)))
 		account->priv->uris_use_email = TRUE;
-	mailbox = e2k_uri_encode (param, "/");
+	mailbox = e2k_uri_encode (param, TRUE, "/");
 	account->home_uri = g_strdup_printf (account->priv->http_uri_schema,
 					     uri->host, mailbox);
 	g_free (mailbox);
Index: storage/exchange-oof.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/storage/exchange-oof.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 exchange-oof.c
--- storage/exchange-oof.c	11 May 2004 15:09:04 -0000	1.1.1.1
+++ storage/exchange-oof.c	5 Aug 2004 17:29:18 -0000
@@ -363,7 +363,7 @@
 		return FALSE;
 
 	if (message) {
-		char *message_enc = e2k_uri_encode (message, NULL);
+		char *message_enc = e2k_uri_encode (message, FALSE, NULL);
 		body = g_strdup_printf ("Cmd=options&OofState=%d&"
 					"OofReply=%s",
 					oof ? 1 : 0, message_enc);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]