From eda37cdcb0978900eaabfd1e7f3a4ca6957278cf Mon Sep 17 00:00:00 2001 From: mguessan Date: Tue, 22 Mar 2011 21:34:05 +0000 Subject: [PATCH] Caldav: first check that email address is valid to avoid InvalidSmtpAddress error on FreeBusy request and new timezone name mapping git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1644 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 5 +++++ src/java/timezones.properties | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 67bd8c13..11ad4dd2 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -3128,6 +3128,11 @@ public abstract class ExchangeSession { * @throws IOException on error */ public FreeBusy getFreebusy(String attendee, String startDateValue, String endDateValue) throws IOException { + // first check that email address is valid to avoid InvalidSmtpAddress error + if (attendee == null || attendee.indexOf('@') < 0 || attendee.charAt(attendee.length() - 1) == '@') { + return null; + } + attendee = replaceIcal4Principal(attendee); if (attendee.startsWith("mailto:") || attendee.startsWith("MAILTO:")) { attendee = attendee.substring("mailto:".length()); diff --git a/src/java/timezones.properties b/src/java/timezones.properties index bd48fe58..fc33440e 100644 --- a/src/java/timezones.properties +++ b/src/java/timezones.properties @@ -93,4 +93,5 @@ GMT\ -0500\ (Standard)\ /\ GMT\ -0400\ (Daylight)=America/New_York GMT\ -0600\ (Standard)\ /\ GMT\ -0500\ (Daylight)=America/Chicago GMT\ -0700\ (Standard)\ /\ GMT\ -0600\ (Daylight)=America/Denver GMT\ -0800\ (Standard)\ /\ GMT\ -0700\ (Daylight)=America/Los_Angeles -GMT\ Standard\ Time=GMT Standard Time \ No newline at end of file +GMT\ Standard\ Time=GMT Standard Time +Greenwich\ Standard\ Time=Greenwich Standard Time