Menu

#259 HTML response to EWS autodiscover triggers libxml2 assert

OBSOLETE_(1.18.x)
closed-fixed
None
Adium
5
2016-04-23
2014-07-10
No

Adium crash after about one minute.
My account setting :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Broadcast Music Information</key>
<false/>
<key>SIPE:User Agent</key>
<string></string>
<key>Proxy Enabled</key>
<integer>0</integer>
<key>isOnline</key>
<true/>
<key>Enabled</key>
<true/>
<key>Proxy Port</key>
<string></string>
<key>Display Custom Emoticons</key>
<false/>
<key>Check Mail</key>
<false/>
<key>SIPE:Email Login</key>
<string></string>
<key>SIPE:Email</key>
<string></string>
<key>Encrypted Chat Preference</key>
<integer>0</integer>
<key>AutoConnect</key>
<false/>
<key>Connect Host</key>
<string><HIDDEN></string>
<key>SIPE:Windows Login</key>
<string><HIDDEN></string>
<key>SIPE:Single Sign On</key>
<true/>
<key>SIPE:Email Password</key>
<string></string>
<key>SIPE:Authentication Scheme</key>
<string>krb5</string>
<key>SIPE:Group Chat Proxy</key>
<string></string>
<key>SIPE:Email URL</key>
<string></string>
<key>SIPE:Password</key>
<string></string>
<key>Disable Typing Notifications</key>
<false/>
<key>LastStatus</key>
<data><HIDDEN></data>
<key>Proxy Username</key>
<string></string>
<key>Use User Icon</key>
<false/>
<key>Proxy Host</key>
<string></string>
<key>SIPE:Connect Host</key>
<string><HIDDEN></string>
</dict>
</plist>

1 Attachments

Related

Release Notes: 2014/08/pidgin-sipe-release-1183

Discussion

  • Stefan Becker

    Stefan Becker - 2014-07-10

    You obviously ignored the pointer to read the FAQ. I'll re-open this bug when the required information is added to this report.

     
  • Stefan Becker

    Stefan Becker - 2014-07-10
    • status: open --> closed-invalid
     
  • Fabrice Bacchella

    Here it is.

     
  • Stefan Becker

    Stefan Becker - 2014-07-10
    • summary: Adium 1.5.10 continuously crash with version 1.18.2 --> HTML response to EWS autodiscover trigger libxml2 assert
    • status: closed-invalid --> accepted
    • assigned_to: Stefan Becker
     
  • Stefan Becker

    Stefan Becker - 2014-07-10

    Thanks for the debug log.

    In your setup the last EWS HTTP request triggers a HTML response, which obviously triggers an assert in libxml2 when we are asking it to parse the reponse body as XML.

    As a workaround you can disable "publish my calendar information" in the SIPE account settings. That will disable EWS autodiscover process to be triggered.

     
  • Stefan Becker

    Stefan Becker - 2014-07-10

    This should be fixed by git commit 1bb58b5.

    @reporter: I need to you to compile SIPEAdiumPlugin from git HEAD, because I can't reproduce your error condition in my setup. Thank you.

     
  • Stefan Becker

    Stefan Becker - 2014-07-10
    • summary: HTML response to EWS autodiscover trigger libxml2 assert --> HTML response to EWS autodiscover triggers libxml2 assert
     
  • Fabrice Bacchella

    The workarounds works.

    But not the patch.

    The stack :
    19:34:38: -[ESDebugController exceptionHandler:shouldLogException:mask:]:76: Exception raised: Uncaught system exception: signal 11
    19:34:38: 0 Adium 0x00000001004d7e40 AILogBacktrace_impl + 54
    1 Adium 0x000000010005f3cd Adium + 390093
    2 ExceptionHandling 0x0000000100a909e2 -[NSExceptionHandler _handleException:mask:] + 168
    3 ExceptionHandling 0x0000000100a907ba NSExceptionHandlerUncaughtSignalHandler + 35
    4 libsystem_c.dylib 0x00007fff8b36f90a _sigtramp + 26
    5 ??? 0x0000000000000105 0x0 + 261
    6 libxml2.2.dylib 0x00007fff8a7269d2 __xmlRaiseError + 1453
    7 libxml2.2.dylib 0x00007fff8a73c8a0 xmlFatalErrMsg + 162
    8 libxml2.2.dylib 0x00007fff8a740253 xmlParsePITarget + 117
    9 libxml2.2.dylib 0x00007fff8a7404c7 xmlParsePI + 210
    10 libxml2.2.dylib 0x00007fff8a74922d xmlParseMisc + 93
    11 libxml2.2.dylib 0x00007fff8a749543 xmlParseDocument + 753
    12 libxml2.2.dylib 0x00007fff8a74d5ec xmlSAXUserParseMemory + 106

    In the log :
    POST /Autodiscover/Autodiscover.xml HTTP/1.1
    Host: 3ds.com
    User-Agent: Sipe/1.18.2
    Accept: text/xml
    Content-Length: 326
    Content-Type: text/xml

    But the server don't care :
    HTTP/1.1 303 See Other
    ...
    Location: https://3ds.com/404-not-found/
    Content-Type: text/html

    And after the repost :
    POST /404-not-found/ HTTP/1.1
    Host: 3ds.com
    ...
    Accept: text/xml

    And the response:
    HTTP/1.1 200 OK
    ...
    Content-Type: text/html

    I know it's badly broken server. But I can't fix it :-(.

    There is something else fishy.

    In the log, i see :
    POST /Autodiscover/Autodiscover.xml HTTP/1.1
    Host: autodiscover.3ds.com
    User-Agent: Sipe/1.18.2
    Accept: text/xml
    Content-Length: 326
    Content-Type: text/xml

    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"> <Request> <EMailAddress>fabrice.bacchella@3ds.com</EMailAddress> <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptabeResponseSchema> </Request></Autodiscover>

    and :
    POST /Autodiscover/Autodiscover.xml HTTP/1.1
    Host: 3ds.com
    User-Agent: Sipe/1.18.2
    Accept: text/xml
    Content-Length: 326
    Content-Type: text/xml

    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006"> <Request> <EMailAddress>fabrice.bacchella@3ds.com</EMailAddress> <AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptabeResponseSchema> </Request></Autodiscover>

    Why some discovery is done on autodiscover.3ds.com (this one almost works) and on 3ds.com (this one is broken) ?

     
    • Stefan Becker

      Stefan Becker - 2014-07-10

      Why some discovery is done on autodiscover.3ds.com (this one almost works) and on 3ds.com (this one is broken) ?

      Because https://%s/Autodiscover/Autodiscover.xml is a fallback that is tried last, which some users needed in the past. See src/core/sipe-ews-autodiscover.c.

       
  • Stefan Becker

    Stefan Becker - 2014-07-10

    BTW: it seems the Mac OS X libxml2 seems to be too old or broken. When I create a fake EWS that responds with the HTML contents from your log, I see the following from the log (Fedora 20):

    (20:52:36) sipe: XML parser error: Domain 1, code 64, level 3: XML declaration allowed only at the start of the document
    (20:52:36) sipe: XML parser error: Domain 1, code 80, level 3: Double hyphen within comment
    (20:52:36) sipe: XML parser error: Domain 1, code 68, level 3: xmlParseStartTag: invalid element name
    (20:52:36) sipe: XML parser error: Domain 1, code 76, level 3: Opening and ending tag mismatch: link line 75 and head
    (20:52:36) sipe: XML parser error: Domain 1, code 76, level 3: Opening and ending tag mismatch: img line 177 and a
    (20:52:36) sipe: XML parser error: Domain 1, code 76, level 3: Opening and ending tag mismatch: a line 177 and div
    (20:52:36) sipe: XML parser error: Domain 1, code 76, level 3: Opening and ending tag mismatch: img line 180 and a
    (20:52:36) sipe: XML parser error: Domain 1, code 76, level 3: Opening and ending tag mismatch: a line 180 and div
    (20:52:36) sipe: XML parser error: Domain 1, code 68, level 3: xmlParseEntityRef: no name
    (20:52:36) sipe: XML parser error: Domain 1, code 68, level 3: xmlParseEntityRef: no name
    ...
    (20:52:36) sipe: XML parser error: Domain 1, code 77, level 3: Premature end of data in tag meta line 74
    (20:52:36) sipe: XML parser error: Domain 1, code 77, level 3: Premature end of data in tag head line 6
    (20:52:36) sipe: XML parser error: Domain 1, code 77, level 3: Premature end of data in tag html line 5
    (20:52:36) sipe: ucs_ews_autodiscover_cb: can't detect EWS URL, contact list operations will not work!
    

    So libxml2 complains and returns a parse error instead of barfing.

     
  • Fabrice Bacchella

    That's possible, I'm on 10.8.5, not 10.9.

     
  • Stefan Becker

    Stefan Becker - 2014-07-10

    Added an additional check on Content-Type in git commit 6061788

    @reporter: please verify, thank you

     
  • Fabrice Bacchella

    yes it works.

     
  • Stefan Becker

    Stefan Becker - 2014-07-11
    • status: accepted --> closed-fixed
     
  • Stefan Becker

    Stefan Becker - 2014-07-11

    Thanks. CLOSING

     

Log in to post a comment.