From 1c1f82c588b1d8e9f7b4ad5c7ed7da7db5a72969 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 12 Dec 2013 21:31:26 +0000 Subject: [PATCH] Caldav: ignore invalid BEGIN line inside object (Sogo Carddav issue) git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2200 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/VObject.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/davmail/exchange/VObject.java b/src/java/davmail/exchange/VObject.java index f6fb76f7..8fa9babc 100644 --- a/src/java/davmail/exchange/VObject.java +++ b/src/java/davmail/exchange/VObject.java @@ -53,10 +53,14 @@ public class VObject { throw new IOException("Invalid first line: " + beginProperty); } type = beginProperty.getValue(); + String beginLine = "BEGIN:" + type; String endLine = "END:" + type; String line = reader.readLine(); while (line != null && !line.startsWith(endLine)) { - handleLine(line, reader); + // ignore invalid BEGIN line inside object (Sogo Carddav issue) + if (!beginLine.equals(line)) { + handleLine(line, reader); + } line = reader.readLine(); } if (line == null) {