Ericsson / exchangecalendar

Exchange 2007/2010/2013 Calendar, Tasks, Contacts and GAL Provider.
GNU General Public License v3.0
925 stars 112 forks source link

Meeting has participant unknown@somewhere.com #136

Closed ghost closed 9 years ago

ghost commented 9 years ago

Whenever I create a meeting to which I add participants, the following failure mail is sent do me:

mx.google.com heeft uw bericht voor de volgende e-mailadressen geweigerd:

unknown@somewhere.com (unknown@somewhere.com)

mx.google.com gaf deze fout: The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at http://support.google.com/mail/bin/answer.py?answer=6596 gw5si16414002wib.7 - gsmtp

The headers are also in it:

unknown@somewhere.com
mx.google.com #550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 gw5si16414002wib.7 - gsmtp ##

Headers:

Received: from ORANGEII.thedomain.local ([??]) by
 ORANGEII.thedomain.local ([??]) with mapi id
 14.01.0438.000; Mon, 16 Mar 2015 09:18:46 +0100
From: "Ernst" <ernst@thedomain.nl>
To: "unknown@somewhere.com" <unknown@somewhere.com>, "Mario"
    <mario@thedomain.nl>, =?utf-8?B?QmlyYcSNLCBab3Jhbg==?=
    <zoran@thedomain.nl>, "Patrick"
    <patrick@thedomain.nl>, "Mihai" <mihai@thedomain.nl>,
    "Sami" <sami@thedomain.nl>, "Andrei"
    <andrei@thedomain.nl>, Richard <richard@thedomain.ro>,
    "Eric" <eric@thedomain.nl>
Subject: Technical meeting
Thread-Topic: Technical meeting
Thread-Index: AdBfwdJaPwozZzF3TaSQDgVSa3/xLA==
Date: Mon, 16 Mar 2015 08:18:46 +0000
Message-ID: <A0365E894822314EBEF6E788106C01DC134A34DA@ORANGEII.thedomain.local>
Accept-Language: nl-NL, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [192.168.1.254]
Content-Type: multipart/alternative;
    boundary="_002_A0365E894822314EBEF6E788106C01DC134A34DAORANGEIImindben_"
MIME-Version: 1.0

Reporting-MTA: dns;ORANGEII.thedomain.local
Received-From-MTA: dns;thedomain.nl
Arrival-Date: Mon, 16 Mar 2015 08:18:46 +0000

Final-Recipient: rfc822;unknown@somewhere.com
Action: failed
Status: 5.1.1
Diagnostic-Code: smtp;550-5.1.1 The email account that you tried to reach does not exist. Please try
 550-5.1.1 double-checking the recipient's email address for typos or
 550-5.1.1 unnecessary spaces. Learn more at
 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 gw5si16414002wib.7 - gsmtp
Remote-MTA: dns;mx.google.com
X-Display-Name: unknown@somewhere.com

Where does that unknown@somewhere.com participant come from? That's the literal address for it. Only the ones with thedomain are changed by me.

NB I'm using Exchange EWS Provider 3.3.1 on Thunderbird 31.5.0 and Lightning 3.3.3.

patricktokeeffe commented 9 years ago

Well, that "somewhere.com" only shows up in three places. It's probably coming from [this one]():

4862     var tmpEmailAddress = attendee.id.replace(/^mailto:/, '');
4863     if (tmpEmailAddress.indexOf("@") > 0) {
4864         mailbox.addChildTag("EmailAddress", "nsTypes", tmpEmailAddress);
4865         }
4866     else {
4867         mailbox.addChildTag("EmailAddress", "nsTypes", "unknown@somewhere.com");
4868     }

Looks like an empty mailto: link or email address with no @ sign returns your mystery participant. I'd start by looking for an invitee whose address is missing from the email.

ghost commented 9 years ago

At the moment, I can't reproduce it anymore; closed for now.

ghost commented 9 years ago

I have a reproducible situation:

Create a new item in calendar 'Leave MB': image

After selecting the participants (only 1), the overview shows: image

After finishing (saving) the event and reopening it, it shows as: image

As you can see, a new participant is added mysteriously.

The headers of the sent invitation:

From: Minddev <minddev@mydomain.nl>
To: "unknown@somewhere.com" <unknown@somewhere.com>, "Doe, John"
    <john.doe@mydomain.nl>
Subject: Test 2
Thread-Topic: Test 2
Thread-Index: AdBse9zVzTtbiWOYRCycMbSDFW0nDg==
Date: Wed, 1 Apr 2015 13:00:43 +0000
Message-ID:
 <BD318A009997BE4C9B61D838A9B2D4C612DA6A4D@ORANGEII.mydomain.local>
Content-Language: en-US

Can I help with debugging?

bavincen commented 9 years ago

Send us your logs >> github mail address :

bavincen commented 9 years ago

please add this code dump("\nattendeeId 1001 : "+attendee.id);

to file {plugin}/chrome/content/mivExchangeCalendar.js , lineNo: 4861 screenshot from 2015-04-06 15 04 29

let me know what is the output..

this is specific to your email address :)

Thanks

ghost commented 9 years ago

I've added the dump to the first file from this list

-./wo6ji4b0.default/extensions/exchangecalendar@extensions.1st-setup.nl/interfaces/exchangeCalendar/mivExchangeCalendar.js:4867:                mailbox.addChildTag("EmailAddress", "nsTypes", "unknown@somewhere.com");
-./wo6ji4b0.default/extensions/exchangecalendar@extensions.1st-setup.nl/interfaces/exchangeEvent/mivExchangeEvent.js:536:                   mailbox.addChildTag("EmailAddress", "t", "unknown@somewhere.com");

This was dumped:

attendeeId 1001 : Doe
tmpEmailAddress : Doe
attendeeId 1001 : mailto:john.doe@mydomain.nl
tmpEmailAddress : john.doe@mydomain.nl

I also dumped the contents of tmpEmailAddress.

Looking at this, I think I know why it breaks. This is the full string for the recipient:

Doe, John <john.doe@mydomain.nl>

As you can see, there is a comma in it. Could it be, the extension needs to be adjusted to support recipients with a comma in the name?

bavincen commented 9 years ago

Can you please so a little research on that. Prefer to check In outlook :)

-----Original Message----- From: "evamindbench" notifications@github.com Sent: ‎07/‎04/‎2015 14:29 To: "Ericsson/exchangecalendar" exchangecalendar@noreply.github.com Cc: "bavincen" bavincen.in@gmail.com Subject: Re: [exchangecalendar] Meeting has participant unknown@somewhere.com(#136)

I've added the dump to the first file from this list -./wo6ji4b0.default/extensions/exchangecalendar@extensions.1st-setup.nl/interfaces/exchangeCalendar/mivExchangeCalendar.js:4867: mailbox.addChildTag("EmailAddress", "nsTypes", "unknown@somewhere.com"); -./wo6ji4b0.default/extensions/exchangecalendar@extensions.1st-setup.nl/interfaces/exchangeEvent/mivExchangeEvent.js:536: mailbox.addChildTag("EmailAddress", "t", "unknown@somewhere.com");This was dumped: attendeeId 1001 : Doe tmpEmailAddress : Doe attendeeId 1001 : mailto:john.doe@mydomain.nl tmpEmailAddress : john.doe@mydomain.nl I also dumped the contents of tmpEmailAddress. Looking at this, I think where it breaks. This is the full string for the recepient: Doe, John john.doe@mydomain.nl As you can see, there is a comma in it. Could it be, the extension needs to be adjusted to support recipients with a comma in the name? — Reply to this email directly or view it on GitHub.

ghost commented 9 years ago

I changed my name on the Exchange server to:

John Doe <john.doe@mydomain.nl>

Now, the unknown address isn't added. The dump:

attendeeId 1001 : mailto:john.doe@mydomain.nl
tmpEmailAddress : john.doe@mydomain.nl
bavincen commented 9 years ago

So the issue is resolved :)

-----Original Message----- From: "evamindbench" notifications@github.com Sent: ‎07/‎04/‎2015 18:15 To: "Ericsson/exchangecalendar" exchangecalendar@noreply.github.com Cc: "bavincen" bavincen.in@gmail.com Subject: Re: [exchangecalendar] Meeting has participant unknown@somewhere.com(#136)

I changed my name on the Exchange server to: John Doe john.doe@mydomain.nl Now, the unknown address isn't added. The dump: attendeeId 1001 : mailto:john.doe@mydomain.nl tmpEmailAddress : john.doe@mydomain.nl — Reply to this email directly or view it on GitHub.

ghost commented 9 years ago

Lol, that's not really a solution ;), only a workaround.

bavincen commented 9 years ago

I think so 😉

-----Original Message----- From: "evamindbench" notifications@github.com Sent: ‎07/‎04/‎2015 18:35 To: "Ericsson/exchangecalendar" exchangecalendar@noreply.github.com Cc: "bavincen" bavincen.in@gmail.com Subject: Re: [exchangecalendar] Meeting has participant unknown@somewhere.com(#136)

Lol, that's not really a solution ;), only a workaround. — Reply to this email directly or view it on GitHub.

ghost commented 9 years ago

NB You don't need to have exchange to reproduce this; just follow these steps:

  1. Open the calendar.
  2. Add a new event.
  3. Add the following participant: Doe, John <john.doe@example.com>
  4. Save the event.
  5. Open the new event.

Now you'll see the unknown@somewhere.com address added. Also, the John Doe participant is now changed to: John <john.doe@example.com>

bavincen commented 9 years ago

Great thanks. nice info.

-----Original Message----- From: "evamindbench" notifications@github.com Sent: ‎07/‎04/‎2015 18:49 To: "Ericsson/exchangecalendar" exchangecalendar@noreply.github.com Cc: "bavincen" bavincen.in@gmail.com Subject: Re: [exchangecalendar] Meeting has participant unknown@somewhere.com(#136)

NB You don't need to have exchange to reproduce this; just follow these steps: Open the calendar. Add a new event. Add the following participant: Doe, John john.doe@example.com Save the event. Open the new event. Now you'll see the unknown@somewhere.com address added. Also, the John Doe participant is now changed to: John john.doe@example.com — Reply to this email directly or view it on GitHub.

bavincen commented 9 years ago

Hi Before fixing, Could you please confirm how does comma , taken place there. or are you just adding it..

ghost commented 9 years ago

All users in my Exchange address book have this format:

Display of name:

last name, first name

Email:

firstname.lastname@mydomain.nl

In the calendar, when I start typing the name of a participant, a drop down appears with the entries like this:

Last name, first name <firstname.lastname@mydomain.nl>

eg.

Doe, John <john.doe@example.com>

I just select the item from the dropdown and it is added to the participants as is.

ghost commented 9 years ago

@bavincen , as you've closed this ticket, does it mean it's fixed ?

aleskovets commented 9 years ago

I am having the same issue with the version 3.3.2

bavincen commented 9 years ago

to be fixed in stable version. Thanks

Ruleke commented 9 years ago

Still seeing this issue with 3.4.0~beta4 @bavincen Can you please re-open the issue until it is fixed ? This is a potential leak of information, somewhere.com is an existing domain, it's a really bad idea to use valid domains as a fallback.

ghost commented 9 years ago

I agree, better to leave that participant, show an error or something.

Ruleke commented 9 years ago

For this specific case please also fix participants with a comma in the name, which is valid for that field.

ghost commented 9 years ago

Any progress on this? I did manually edit this out myself, but then updated to the new release and it overwrote my amendments.

I only found out when my boss freaked out over my including unknown@somewhere.com on an invite to a customer meeting.

p.s. as a temp fix, just change it for null@null

Its much better then having it go to an actual domain. As @Ruleke mentions, this is a serious security flaw at the moment.

If the domain owner of somewhere.com sets up a mail server, they will be getting all sorts of users calender invites.

I don't mind doing this, but I have no idea which branch to push to?

bavincen commented 9 years ago

Hi You can send us a pull request thanks

We are planning to fix it in coming stable release

ghost commented 9 years ago

Sure thing

bavincen commented 9 years ago

Ok sorry fro disappointing this issue is existing even when our addon is not installed. i am marking it invalid. please raise a concern in lightning community.. thanks

ghost commented 9 years ago

@bavincen ,to do that, it's a good thing to have a history of your debugging. Could you provide that here, then I'll create a proper bug report over there.

bavincen commented 9 years ago

add a ics calendar type attendee name like

"firstname , lastname <email@domain.com>"

click ok

then click on the invitees list before closing you will see two attendeees

lukehinds commented 9 years ago

The bug is still there, as the unknown@somewhere.com is still in the code.

I made a pull request as this is a security risk...

https://github.com/Ericsson/exchangecalendar/pull/293

This changes unknown@somewhere.com to null@null

unknown@somewhere.com results in a delivery failure, as does null@null, but null@null is much safer as unknown@somewhere.com could result in information leak should they set up an email server.

bavincen commented 9 years ago

Lightning has already fixed this issue.. please check it in Lighning 4.0 EWS beta7 TB 38*