Bug 87706 - Exchange plugin stopped working in kde 3.3
Summary: Exchange plugin stopped working in kde 3.3
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: exchangeplugin (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-21 22:11 UTC by Rajil Saraswat
Modified: 2005-01-12 18:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
trace from suse 9.1 and 9.2 (866 bytes, text/plain)
2005-01-12 17:13 UTC, Birger Kollstrand
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rajil Saraswat 2004-08-21 22:11:39 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Gentoo Packages
OS:                Linux

The exchange plugin no longer works for me in kde3.3, whereas it used to work in kde3.2. We have an exchange 2000 server supporting ssl. The plugin configuration in .kontactrc is as follows:
Calendar/Exchange Plugin]
MS-ID=
auto-mailbox=false
host=exc.mail.ac.uk
mailbox=webdavs://exc.mail.ac.uk/exchange/hwd
user=hwd

Korganizer is able to authenticate against the server but the response is as follows(Server response could not be interpreted):

WebDAV SEARCH response:
<error-report xmlns="DAV:">
 <offending-response xmlns="DAV:">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2 Final//EN&quot;>
&lt;html dir=ltr>

&lt;head>
&lt;style>
a:link   {font:8pt/11pt verdana; color:FF0000}
a:visited  {font:8pt/11pt verdana; color:#4e4e4e}
&lt;/style>

&lt;META NAME=&quot;ROBOTS&quot; CONTENT=&quot;NOINDEX&quot;>

&lt;title>The page cannot be found&lt;/title>

&lt;META HTTP-EQUIV=&quot;Content-Type&quot; Content=&quot;text-html; charset=Windows-1252&quot;>
&lt;/head>

&lt;script> 
function Homepage(){
&lt;!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm 

 //For testing use DocURL = &quot;res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm&quot;
 DocURL=document.URL;
 
 //this is where the http or https will be, as found by searching for :// but skipping the res://
 protocolIndex=DocURL.indexOf(&quot;://&quot;,4);
 
 //this finds the ending slash for the domain server 
 serverIndex=DocURL.indexOf(&quot;/&quot;,protocolIndex + 3);

 //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining 
 //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
 //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
 BeginURL=DocURL.indexOf(&quot;#&quot;,1) + 1;
 urlresult=DocURL.substring(BeginURL,serverIndex);
  
 //for display, we need to skip after http://, and go to the next slash
 displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
 InsertElementAnchor(urlresult, displayresult);
}

function HtmlEncode(text)
{
    return text.replace(/&amp;/g, '&amp;amp').replace(/'/g, '&amp;quot;').replace(/&lt;/g, '&amp;lt;').replace(/>/g, '&amp;gt;');
}

function TagAttrib(name, value)
{
    return ' '+name+'=&quot;'+HtmlEncode(value)+'&quot;';
}

function PrintTag(tagName, needCloseTag, attrib, inner){
    document.write( '&lt;' + tagName + attrib + '>' + HtmlEncode(inner) );
    if (needCloseTag) document.write( '&lt;/' + tagName +'>' );
}

function URI(href)
{
    IEVer = window.navigator.appVersion;
    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );

    return (IEVer.charAt(1)=='.' &amp;&amp; IEVer >= '5.5') ?
        encodeURI(href) :
        escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}

function InsertElementAnchor(href, text)
{
    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}

//-->
&lt;/script>

&lt;body bgColor=&quot;FFFFFF&quot;>

&lt;table width=&quot;410&quot; cellpadding=&quot;3&quot; cellspacing=&quot;5&quot;>
  
 &lt;td align=&quot;left&quot; valign=&quot;middle&quot; width=&quot;360&quot;>
 &lt;h1 style=&quot;COLOR:000000; FONT: 13pt/15pt verdana&quot;>&lt;!--Problem-->The page cannot be found&lt;/h1>
    &lt;/td>
  &lt;/tr>
  
  &lt;tr>
    &lt;td width=&quot;400&quot; colspan=&quot;2&quot;>
 &lt;font style=&quot;COLOR:000000; FONT: 8pt/11pt verdana&quot;>The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.&lt;/font>&lt;/td>
  &lt;/tr>
  
  &lt;tr>
    &lt;td width=&quot;400&quot; colspan=&quot;2&quot;>
 &lt;font style=&quot;COLOR:000000; FONT: 8pt/11pt verdana&quot;>

 &lt;hr color=&quot;#C0C0C0&quot; noshade>
 
    &lt;p>Please try the following:&lt;/p>

 &lt;ul>
      &lt;li>If you typed the page address in the Address bar, make sure that it is spelled correctly.&lt;/li>
   
      &lt;li>Open the

   &lt;script language=&quot;JavaScript&quot;> 
   &lt;!--
   if (!((window.navigator.userAgent.indexOf(&quot;MSIE&quot;) > 0) &amp;&amp; (window.navigator.appVersion.charAt(0) == &quot;2&quot;)))
   {
    Homepage();
   }
   -->
   &lt;/script>

   home page, and then look for links to the information you want.&lt;/li>
   
   &lt;li>Click the
   &lt;a href=&quot;javascript:history.back(1)&quot;>
   Back&lt;/a> button to try another link.&lt;/li>
    &lt;/ul>
 
    &lt;h2 style=&quot;COLOR:000000; FONT: 8pt/11pt verdana&quot;>HTTP 400 - Bad Request&lt;br>
    Internet Information Services&lt;/h2>

 &lt;hr color=&quot;#C0C0C0&quot; noshade>
 
 &lt;p>Technical Information (for support personnel)&lt;/p>
 
&lt;ul>
&lt;li>More information:&lt;br>
&lt;a href=&quot;http://www.microsoft.com/ContentRedirect.asp?prd=iis&amp;sbp=&amp;pver=5.0&amp;pid=&amp;ID=400&amp;cat=web&amp;os=&amp;over=&amp;hrd=&amp;Opt1=&amp;Opt2=&amp;Opt3=&quot; target=&quot;_blank&quot;>Microsoft Support&lt;/a>
&lt;/li>
&lt;/ul>

    &lt;/font>&lt;/td>
  &lt;/tr>

&lt;/table>
&lt;/body>
&lt;/html>
</offending-response>
</error-report>

Thanks
Comment 1 Jeff 2004-08-26 20:08:45 UTC
I see the same error in kde-3.3.0.  It worked fine for me in kde-3.2.  I am also using gentoo linux.  The ldap address lookup is broken for me now, too, using the same settings that worked for me in kde-3.2.
Comment 2 Cade Robinson 2004-08-30 16:56:44 UTC
I see this same behavior with the Debian packages as well.
Comment 3 Hans-Christian Prytz 2004-09-21 16:00:44 UTC
I can also confirm this problem in kde-3.3.0. I also used this plugin with kde-3.2. The exchange server has not changed or been patched.
Comment 4 Brian DeRocher 2004-11-17 18:57:53 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Reinhold Kainhofer 2004-11-17 22:54:30 UTC
Hi,
Thanks for the bug report.
Unfortunately I can't reproduce that problem with an Exchange 2003 Server. Does any of you have the URL that is requested from the server? The error page in this bug report does not list the requested URL, so I don't know what might be wrong there.

Cheers,
Reinhold
Comment 6 Cade Robinson 2004-11-22 22:58:18 UTC
Where / how can I get you the info on the URL? 
 
 
>  
> From: Reinhold Kainhofer <reinhold@kainhofer.com> 
> Date: 2004/11/17 Wed PM 03:54:32 CST 
> To: cader@charter.net 
> Subject: [Bug 87706] Exchange plugin stopped working in 
kde 3.3 
>  
> ------- You are receiving this mail because: ------- 
> You are a voter for the bug, or are watching someone who 
is. 
>          
> http://bugs.kde.org/show_bug.cgi?id=87706         
>  
>  
>  
>  
> ------- Additional Comments From reinhold kainhofer com  
2004-11-17 22:54 ------- 
> Hi, 
> Thanks for the bug report. 
> Unfortunately I can't reproduce that problem with an 
Exchange 2003 Server. Does any of you have the URL that is 
requested from the server? The error page in this bug 
report does not list the requested URL, so I don't know 
what might be wrong there. 
>  
> Cheers, 
> Reinhold 
>  

Cade Robinson

Comment 7 Tais P. Hansen 2004-11-26 13:44:45 UTC
Should this even work with Exchange 2003? I get a "cyclic link detected" error when trying to access our Exchange 2003 server.
Comment 8 Reinhold Kainhofer 2004-11-26 14:01:58 UTC
On Friday 26 November 2004 13:44, Tais M.Hansen wrote:
> Should this even work with Exchange 2003? I get a "cyclic link
> detected" error when trying to access our Exchange 2003 server.

Yes, I tested it with an Exchange 2003 server (actually, I can only test it 
with an Exchange 2003 server)...

Reinhold

Comment 9 Ken Deeter 2004-12-06 20:31:10 UTC
Hi,

Here's a packet dump from the http transfer..

Looks like it fails on the SEARCH request. Here are the packets that make up the search request.

1st packet
0000  00 04 96 10 2b b0 00 11 11 4b e5 3c 08 00 45 00   ....+....K.<..E.
0010  02 52 e9 48 40 00 40 06 c1 c1 0a 11 6b 19 0a 10   .R.H@.@.....k...
0020  0e 62 d1 0a 00 50 78 96 9b 7d f3 28 e6 c3 80 18   .b...Px..}.(....
0030  00 2e 96 8e 00 00 01 01 08 0a 66 02 72 3b 00 00   ..........f.r;..
0040  00 00 53 45 41 52 43 48 20 2f 65 78 63 68 61 6e   ..SEARCH /exchan
0050  67 65 2f 6b 65 6e 2f 43 61 6c 65 6e 64 61 72 20   ge/ken/Calendar 
0060  48 54 54 50 2f 31 2e 31 0d 0a 43 6f 6e 6e 65 63   HTTP/1.1..Connec
0070  74 69 6f 6e 3a 20 4b 65 65 70 2d 41 6c 69 76 65   tion: Keep-Alive
0080  0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f   ..User-Agent: Mo
0090  7a 69 6c 6c 61 2f 35 2e 30 20 28 63 6f 6d 70 61   zilla/5.0 (compa
00a0  74 69 62 6c 65 3b 20 4b 6f 6e 71 75 65 72 6f 72   tible; Konqueror
00b0  2f 33 2e 33 3b 20 4c 69 6e 75 78 29 20 28 4b 48   /3.3; Linux) (KH
00c0  54 4d 4c 2c 20 6c 69 6b 65 20 47 65 63 6b 6f 29   TML, like Gecko)
00d0  0d 0a 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63   ..Pragma: no-cac
00e0  68 65 0d 0a 43 61 63 68 65 2d 63 6f 6e 74 72 6f   he..Cache-contro
00f0  6c 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 41 63 63   l: no-cache..Acc
0100  65 70 74 3a 20 74 65 78 74 2f 68 74 6d 6c 2c 20   ept: text/html, 
0110  69 6d 61 67 65 2f 6a 70 65 67 2c 20 69 6d 61 67   image/jpeg, imag
0120  65 2f 70 6e 67 2c 20 74 65 78 74 2f 2a 2c 20 69   e/png, text/*, i
0130  6d 61 67 65 2f 2a 2c 20 2a 2f 2a 0d 0a 41 63 63   mage/*, */*..Acc
0140  65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 78 2d   ept-Encoding: x-
0150  67 7a 69 70 2c 20 78 2d 64 65 66 6c 61 74 65 2c   gzip, x-deflate,
0160  20 67 7a 69 70 2c 20 64 65 66 6c 61 74 65 0d 0a    gzip, deflate..
0170  41 63 63 65 70 74 2d 43 68 61 72 73 65 74 3a 20   Accept-Charset: 
0180  69 73 6f 2d 38 38 35 39 2d 31 2c 20 75 74 66 2d   iso-8859-1, utf-
0190  38 3b 71 3d 30 2e 35 2c 20 2a 3b 71 3d 30 2e 35   8;q=0.5, *;q=0.5
01a0  0d 0a 41 63 63 65 70 74 2d 4c 61 6e 67 75 61 67   ..Accept-Languag
01b0  65 3a 20 65 6e 0d 0a 48 6f 73 74 3a 20 70 61 2d   e: en..Host: pa-
01c0  65 63 6c 75 73 74 65 72 31 2e 76 6d 77 61 72 65   ecluster1.vmware
01d0  2e 63 6f 6d 0d 0a 43 6f 6f 6b 69 65 3a 20 73 65   .com..Cookie: se
01e0  73 73 69 6f 6e 69 64 3d 32 34 63 36 34 36 39 62   ssionid=24c6469b
01f0  2d 64 61 34 63 2d 34 64 64 64 2d 38 39 35 30 2d   -da4c-4ddd-8950-
0200  61 38 37 33 66 66 33 38 61 65 39 32 3a 30 78 39   a873ff38ae92:0x9
0210  0d 0a 41 75 74 68 6f 72 69 7a 61 74 69 6f 6e 3a   ..Authorization:
0220  20 42 61 73 69 63 20 61 32 56 75 4f 6e 45 78 59    Basic a2VuOnExY
0230  57 35 73 4d 51 3d 3d 0d 0a 43 6f 6e 74 65 6e 74   W5sMQ==..Content
0240  2d 54 79 70 65 3a 20 74 65 78 74 2f 78 6d 6c 3b   -Type: text/xml;
0250  20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a    charset=utf-8..

2nd packet
0000  00 04 96 10 2b b0 00 11 11 4b e5 3c 08 00 45 00   ....+....K.<..E.
0010  00 4b e9 49 40 00 40 06 c3 c7 0a 11 6b 19 0a 10   .K.I@.@.....k...
0020  0e 62 d1 0a 00 50 78 96 9d 9b f3 28 e6 c3 80 18   .b...Px....(....
0030  00 2e d9 fc 00 00 01 01 08 0a 66 02 72 3b 00 00   ..........f.r;..
0040  00 00 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68   ..Content-Length
0050  3a 20 34 31 38 0d 0a 0d 0a                        : 418....

3rd packet
0000  00 04 96 10 2b b0 00 11 11 4b e5 3c 08 00 45 00   ....+....K.<..E.
0010  01 d6 e9 4a 40 00 40 06 c2 3b 0a 11 6b 19 0a 10   ...J@.@..;..k...
0020  0e 62 d1 0a 00 50 78 96 9d b2 f3 28 e6 c3 80 18   .b...Px....(....
0030  00 2e 66 c2 00 00 01 01 08 0a 66 02 72 3b 00 00   ..f.......f.r;..
0040  00 00 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d   ..<?xml version=
0050  22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22   "1.0" encoding="
0060  75 74 66 2d 38 22 3f 3e 0d 0a 3c 73 65 61 72 63   utf-8"?>..<searc
0070  68 72 65 71 75 65 73 74 20 78 6d 6c 6e 73 3d 22   hrequest xmlns="
0080  44 41 56 3a 22 3e 0a 20 3c 73 71 6c 20 78 6d 6c   DAV:">. <sql xml
0090  6e 73 3d 22 44 41 56 3a 22 3e 53 45 4c 45 43 54   ns="DAV:">SELECT
00a0  20 26 71 75 6f 74 3b 44 41 56 3a 68 72 65 66 26    &quot;DAV:href&
00b0  71 75 6f 74 3b 2c 20 26 71 75 6f 74 3b 75 72 6e   quot;, &quot;urn
00c0  3a 73 63 68 65 6d 61 73 3a 63 61 6c 65 6e 64 61   :schemas:calenda
00d0  72 3a 69 6e 73 74 61 6e 63 65 74 79 70 65 26 71   r:instancetype&q
00e0  75 6f 74 3b 2c 20 26 71 75 6f 74 3b 75 72 6e 3a   uot;, &quot;urn:
00f0  73 63 68 65 6d 61 73 3a 63 61 6c 65 6e 64 61 72   schemas:calendar
0100  3a 75 69 64 26 71 75 6f 74 3b 0d 0a 46 52 4f 4d   :uid&quot;..FROM
0110  20 53 63 6f 70 65 28 27 73 68 61 6c 6c 6f 77 20    Scope('shallow 
0120  74 72 61 76 65 72 73 61 6c 20 6f 66 20 26 71 75   traversal of &qu
0130  6f 74 3b 26 71 75 6f 74 3b 27 29 0d 0a 57 48 45   ot;&quot;')..WHE
0140  52 45 20 26 71 75 6f 74 3b 75 72 6e 3a 73 63 68   RE &quot;urn:sch
0150  65 6d 61 73 3a 63 61 6c 65 6e 64 61 72 3a 64 74   emas:calendar:dt
0160  65 6e 64 26 71 75 6f 74 3b 20 3e 20 27 32 30 30   end&quot; > '200
0170  34 2d 31 32 2d 30 36 54 30 30 3a 30 30 3a 30 30   4-12-06T00:00:00
0180  5a 27 0d 0a 41 4e 44 20 26 71 75 6f 74 3b 75 72   Z'..AND &quot;ur
0190  6e 3a 73 63 68 65 6d 61 73 3a 63 61 6c 65 6e 64   n:schemas:calend
01a0  61 72 3a 64 74 73 74 61 72 74 26 71 75 6f 74 3b   ar:dtstart&quot;
01b0  20 26 6c 74 3b 20 27 32 30 30 34 2d 31 32 2d 30    &lt; '2004-12-0
01c0  37 54 32 33 3a 35 39 3a 35 39 5a 27 3c 2f 73 71   7T23:59:59Z'</sq
01d0  6c 3e 0a 3c 2f 73 65 61 72 63 68 72 65 71 75 65   l>.</searchreque
01e0  73 74 3e 0a                                       st>.

It looks like in the xml, there are lots of &quot; 's that should be real double quote characters and not escape sequences.
Comment 10 Ken Deeter 2004-12-06 20:41:13 UTC
or maybe 2003 can deal with the escape sequences whereas 2000 can't?
Comment 11 Reinhold Kainhofer 2004-12-06 22:48:06 UTC
On Monday, 6. December 2004 20:31, Ken Deeter wrote:
> It looks like in the xml, there are lots of &quot; 's that should be real
> double quote characters and not escape sequences.

Yes, these &quot;'s are correct. All " and < in an webdav request need to be 
escaped.
For completeness, this is the actual XML sent to the server (extracted from 
the log, all characters unescaped again):

<?xml version="1.0" encoding="utf-8"?>

<searchrequest xmlns="DAV:">
 <sql xmlns="DAV:">SELECT "DAV:href", "urn:schemas:calendar:instancetype", 
"urn:schemas:calendar:uid"
FROM Scope('shallow traversal of ""')
WHERE "urn:schemas:calendar:dtend" > '2004-12-06T00:00:00Z'
AND "urn:schemas:calendar:dtstart" < '2004-12-07T23:59:59Z'</sql>
</searchrequest>


Cheers,
Reinhold

Comment 12 Ken Deeter 2004-12-07 08:50:40 UTC
On a related note, this msdn page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_using_http_1_1_webdav_protocol.asp

mentions that single quote needs to be escaped as &apos;

Could that make a difference?
Comment 13 Birger Kollstrand 2005-01-12 17:13:29 UTC
Created attachment 9054 [details]
trace from suse 9.1 and 9.2

text extracted from ethereal trace.
Comment 14 Birger Kollstrand 2005-01-12 17:18:32 UTC
Hi,
A bit short note n the attachment there. Sorry about that.
The first part in the attachment is from a SuSE 9.1 machine  the second part from a SuSE 9.2. The MS Exchange server in the other end is a Exchange 2000.

The search fails on SuSE 9.2 at my location also. 

There are some diffrences in the date stamps on the end of the search on SuSE 9.2 that does look strange and definetly different from SuSE9.1. In the second trace there is also a time stamp sent which is not sent in the first.

regards birger....
Comment 15 Reinhold Kainhofer 2005-01-12 17:58:13 UTC
Thanks a lot birger, 
That's exactly the things that are really useful when trying to track down a bug! 

BTW, it looks like you took the hex trace from ethereal and manually copied out just the corresponding column... You can also just use the RMB menu item "Follow TCP stream" to obtain a readable output of the communication!

Cheers,
Reinhold
Comment 16 Reinhold Kainhofer 2005-01-12 18:17:23 UTC
Okay, this was a bug in kde 3.3.0, where the time format was sent in a wrong format to the exchange server... In kde 3.3.2 and in 3.4 this problem is definitly fixed. I'm not sure about 3.3.1.

Cheers,
Reinhold