Don't quote the charset value, the qop value, nor the response value.
authorJeffrey Stedfast <fejj@ximian.com>
Wed, 2 Jul 2003 23:43:12 +0000 (23:43 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Wed, 2 Jul 2003 23:43:12 +0000 (23:43 +0000)
2003-07-01  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl-digest-md5.c (digest_response): Don't quote the
charset value, the qop value, nor the response value. Fixes bug
#45712.

camel/ChangeLog
camel/camel-sasl-digest-md5.c

index 4e53989..6b6bbce 100644 (file)
@@ -1,5 +1,11 @@
 2003-07-01  Jeffrey Stedfast  <fejj@ximian.com>
 
+       * camel-sasl-digest-md5.c (digest_response): Don't quote the
+       charset value, the qop value, nor the response value. Fixes bug
+       #45712.
+
+2003-07-01  Jeffrey Stedfast  <fejj@ximian.com>
+
        * camel-mime-utils.c (header_format_date): Use gmtime_r() instead
        of using gmtime() and memcpy() to try and be "atomic".
 
index 7c50c4f..8d7a704 100644 (file)
@@ -42,6 +42,8 @@
 
 #define PARANOID(x) x
 
+/* Implements rfc2831 */
+
 CamelServiceAuthType camel_sasl_digest_md5_authtype = {
        N_("DIGEST-MD5"),
 
@@ -743,18 +745,17 @@ digest_response (struct _DigestResponse *resp)
        g_byte_array_append (buffer, "\",nc=", 5);
        g_byte_array_append (buffer, resp->nc, 8);
        
-       g_byte_array_append (buffer, ",qop=\"", 6);
+       g_byte_array_append (buffer, ",qop=", 5);
        str = qop_to_string (resp->qop);
        g_byte_array_append (buffer, str, strlen (str));
        
-       g_byte_array_append (buffer, "\",digest-uri=\"", 14);
+       g_byte_array_append (buffer, ",digest-uri=\"", 13);
        buf = digest_uri_to_string (resp->uri);
        g_byte_array_append (buffer, buf, strlen (buf));
        g_free (buf);
        
-       g_byte_array_append (buffer, "\",response=\"", 12);
+       g_byte_array_append (buffer, "\",response=", 11);
        g_byte_array_append (buffer, resp->resp, 32);
-       g_byte_array_append (buffer, "\"", 1);
        
        if (resp->maxbuf > 0) {
                g_byte_array_append (buffer, ",maxbuf=", 8);
@@ -764,9 +765,8 @@ digest_response (struct _DigestResponse *resp)
        }
        
        if (resp->charset) {
-               g_byte_array_append (buffer, ",charset=\"", 10);
+               g_byte_array_append (buffer, ",charset=", 9);
                g_byte_array_append (buffer, resp->charset, strlen (resp->charset));
-               g_byte_array_append (buffer, "\"", 1);
        }
        
        if (resp->cipher != CIPHER_INVALID) {