Package: ejabberd
Version: 14.07-4+deb8u2
Tags: upstream, patch

Hello,

search for anything in mod_vcard_ldap results in the ldap modules
crashing, excerpt from logs:
...
2015-12-30 15:13:07 =CRASH REPORT====
  crasher:
      initial call: eldap:init/1
          pid: <0.409.0>
              registered_name: 'eldap_#Ref<0.0.0.11189>'
                  exception exit:
                  
{{{badmatch,{error,{asn1,{function_clause,[{'ELDAPv3',enc_SubstringFilter_substrings_components,[{'SubstringFilter_substrings',
...

It looks like ejabberd is unable to build proper ldap search and
chokes on the results.

In upstream, it is recorded at
https://support.process-one.net/browse/EJAB-1715

This also looks related to #797645

Could you please consider the patch below (sorry - might not be
wihtespace clean)?

Bye,

Joerg

diff --git a/src/ELDAPv3.erl b/src/ELDAPv3.erl
index 4945731..c66fa97 100644
--- a/src/ELDAPv3.erl
+++ b/src/ELDAPv3.erl
@@ -1765,6 +1765,10 @@ encode_tags(TagIn, BytesSoFar, LenSoFar).
       {EncBytes,EncLen} = 
'enc_SubstringFilter_substrings_components'(Val,[],0),
    encode_tags(TagIn, EncBytes, EncLen).
 
+'enc_SubstringFilter_substrings_components'({'SubstringFilter_substrings', L}, 
AccBytes, AccLen)
+   when is_list(L) ->
+   'enc_SubstringFilter_substrings_components'(L, AccBytes, AccLen);
+
 'enc_SubstringFilter_substrings_components'([], AccBytes, AccLen) -> 
    {lists:reverse(AccBytes),AccLen};
 

Attachment: signature.asc
Description: PGP signature

Reply via email to