]> err.no Git - sope/commitdiff
fixed a parsing bug
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 15 Jul 2005 10:28:40 +0000 (10:28 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 15 Jul 2005 10:28:40 +0000 (10:28 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@907 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-mime/ChangeLog
sope-mime/NGImap4/ChangeLog
sope-mime/NGImap4/NGImap4ResponseParser.m
sope-mime/Version

index c9bd19153f6cdd3b7ea61f03474a1def4abe6794..cd71f779540a1732c313c6dc2003b1c3524f9297 100644 (file)
@@ -1,7 +1,11 @@
+2005-07-15  Helge Hess  <helge.hess@opengroupware.org>
+
+       * NGImap4: fixed a parsing bug in ACL responses (v4.5.228)
+
 2005-07-14  Helge Hess  <helge.hess@opengroupware.org>
 
        * NGImap4: fixed default names of NGImap4Connection, some code reorgs
-         (v.4.5.227)
+         (v4.5.227)
 
 2005-07-13  Helge Hess  <helge.hess@opengroupware.org>
 
index a241bf148befd700a2de2762365ae8df6db09b73..07a6ffce8968f89e96b487c7312b636adb213775 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-15  Helge Hess  <helge.hess@opengroupware.org>
+
+       * NGImap4ResponseParser.m: fixed a bug in parsing mailbox names in ACL
+         responses
+
 2005-07-14  Helge Hess  <helge.hess@opengroupware.org>
 
        * NGImap4Connection.m: updated defaults to use NGImap4Connection*
index dfa7a5330b97397d3fabde56c1237b8625e48de4..d3eeedca03d341e549f456e7f6d2f04df147ff40 100644 (file)
@@ -734,8 +734,9 @@ static void _parseUntaggedResponse(NGImap4ResponseParser *self,
     return NO;
   _consume(self, 4);
   
-  if ((obj = _parseUntil(self, ' ')) != nil)
+  if ((obj = _parseBodyString(self, YES)) != nil)
     [result_ setObject:obj forKey:@"mailbox"];
+  _consumeIfMatch(self, ' ');
   
   acls = _parseUntil(self, '\n');
   
@@ -772,8 +773,9 @@ static void _parseUntaggedResponse(NGImap4ResponseParser *self,
     return NO;
   _consume(self, 9);
   
-  if ((obj = _parseUntil(self, ' ')) != nil)
+  if ((obj = _parseBodyString(self, YES)) != nil)
     [result_ setObject:obj forKey:@"mailbox"];
+  _consumeIfMatch(self, ' ');
   
   rights = _parseUntil(self, '\n');
   [result_ setObject:rights forKey:@"myrights"];
@@ -794,10 +796,13 @@ static void _parseUntaggedResponse(NGImap4ResponseParser *self,
     return NO;
   _consume(self, 11);
   
-  if ((obj = _parseUntil(self, ' ')) != nil)
+  if ((obj = _parseBodyString(self, YES)) != nil)
     [result_ setObject:obj forKey:@"mailbox"];
-  if ((obj = _parseUntil(self, ' ')) != nil)
+  _consumeIfMatch(self, ' ');
+
+  if ((obj = _parseBodyString(self, YES)) != nil)
     [result_ setObject:obj forKey:@"uid"];
+  _consumeIfMatch(self, ' ');
   
   if ((obj = _parseUntil(self, ' ')) != nil) {
     if ([obj isEqual:@"\"\""])
@@ -1565,10 +1570,10 @@ static NSString *_parseBodyDecodeString(NGImap4ResponseParser *self,
                                         BOOL _convertString,
                                         BOOL _decode)
 {
-
   NSString *str;
   
   if (_la(self, 0) == '"') {
+    // TODO: can the " be escaped somehow?
     _consume(self, 1);
     str = _parseUntil(self, '"');
   }
@@ -1593,15 +1598,15 @@ static NSString *_parseBodyDecodeString(NGImap4ResponseParser *self,
   }
   if (_decode) {
     id  d;
-
+    
     d = [str dataUsingEncoding:defCStringEncoding];
     d = [d decodeQuotedPrintableValueOfMIMEHeaderField:nil];
-
+    
     if ([d isKindOfClass:StrClass])
       str = d;
     else {
       str = [[[StrClass alloc] initWithData:d encoding:encoding]
-                             autorelease];
+                              autorelease];
     }
   }
   return str;
index 70d1e69494eff2d72eaf332532173c26a49d04d8..4948443dda7e3ffdfa0a9bb4db0f012fb8714e65 100644 (file)
@@ -2,7 +2,7 @@
 
 MAJOR_VERSION:=4
 MINOR_VERSION:=5
-SUBMINOR_VERSION:=227
+SUBMINOR_VERSION:=228
 
 # v4.5.214 requires libNGExtensions v4.5.146
 # v4.2.149 requires libNGStreams    v4.2.34