Ver Fonte

Bug 1813: Cannot list WebDAV directory when any of the files is locked and the <depth> element contains whitespaces around its contents

https://winscp.net/tracker/1813

Source commit: 6c7d8971651045d3e653108ab8538b9bca5427dc
Martin Prikryl há 5 anos atrás
pai
commit
7054484c20
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      libs/neon/src/ne_locks.c

+ 6 - 1
libs/neon/src/ne_locks.c

@@ -476,7 +476,12 @@ end_element_common(struct ne_lock *l, int state, const char *cdata)
 	break;
     case ELM_depth:
 	NE_DEBUG(NE_DBG_LOCKS, "Got depth: %s\n", cdata);
-	l->depth = parse_depth(cdata);
+	{
+	char * depth = strdup(cdata);
+	char * depth_shaved = ne_shave(depth, "\r\n\t ");
+	l->depth = parse_depth(depth_shaved);
+	ne_free(depth);
+	}
 	if (l->depth == -1) {
 	    return -1;
 	}