From eb6e224855aa39d80f55cc6a7327a4913c821a85 Mon Sep 17 00:00:00 2001 From: mguessan Date: Fri, 5 Nov 2010 09:59:08 +0000 Subject: [PATCH] Fix 3103349: Cannot login if display name contains [brackets] git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1526 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/ExchangeSession.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exchange/ExchangeSession.java b/src/java/davmail/exchange/ExchangeSession.java index 9917dfeb..6211829d 100644 --- a/src/java/davmail/exchange/ExchangeSession.java +++ b/src/java/davmail/exchange/ExchangeSession.java @@ -2842,8 +2842,8 @@ public abstract class ExchangeSession { int start = line.toLowerCase().lastIndexOf(MAILBOX_BASE) + MAILBOX_BASE.length(); int end = line.indexOf('<', start); alias = line.substring(start, end); - start = line.indexOf('[') + 1; - end = line.indexOf(']', start); + start = line.lastIndexOf('[') + 1; + end = line.lastIndexOf(']', start); email = line.substring(start, end); }