diff -u ejabberd-2.1.10/debian/changelog ejabberd-2.1.10/debian/changelog --- ejabberd-2.1.10/debian/changelog +++ ejabberd-2.1.10/debian/changelog @@ -1,3 +1,11 @@ +ejabberd (2.1.10-2ubuntu1.1+bug1097366) precise; urgency=low + + * Add digest-uri-virtual-hosts.patch from upstream commit f434501 + - Fixes a problem with Pidgin not being able to log in on a server + with multiple virtual hosts and SRV records (LP: #1097366) + + -- a7x Tue, 08 Jan 2013 12:52:21 -0500 + ejabberd (2.1.10-2ubuntu1.1) precise-proposed; urgency=low * Backported debian/patches/relax-digest-uri-handling.patch from 2.1.10-3 diff -u ejabberd-2.1.10/debian/patches/series ejabberd-2.1.10/debian/patches/series --- ejabberd-2.1.10/debian/patches/series +++ ejabberd-2.1.10/debian/patches/series @@ -5,0 +6 @@ +digest-uri-virtual-hosts.patch only in patch2: unchanged: --- ejabberd-2.1.10.orig/debian/patches/digest-uri-virtual-hosts.patch +++ ejabberd-2.1.10/debian/patches/digest-uri-virtual-hosts.patch @@ -0,0 +1,60 @@ +From f4345017c347d039013a33af9718e8c2c16ee84f Mon Sep 17 00:00:00 2001 +From: Badlop +Date: Thu, 21 Jun 2012 13:56:25 +0200 +Subject: [PATCH] Allow multiple fqdn values in configuration (EJAB-1578) + +--- + doc/guide.tex | 2 +- + src/cyrsasl_digest.erl | 19 +++++++++++++++---- + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/doc/guide.tex b/doc/guide.tex +index ca60f37..552b83a 100644 +--- a/doc/guide.tex ++++ b/doc/guide.tex +@@ -1241,7 +1241,7 @@ The option \option{fqdn} allows you to define the Fully Qualified Domain Name + of the machine, in case it isn't detected automatically. + The FQDN is used to authenticate some clients that use the DIGEST-MD5 SASL mechanism. + The option syntax is: +-\esyntax{\{fqdn, undefined|FqdnString\}.} ++\esyntax{\{fqdn, undefined|FqdnString|[FqdnString]\}.} + + \makesubsubsection{internalauth}{Internal} + \ind{internal authentication}\ind{Mnesia} +diff --git a/src/cyrsasl_digest.erl b/src/cyrsasl_digest.erl +index 134a86d..056df33 100644 +--- a/src/cyrsasl_digest.erl ++++ b/src/cyrsasl_digest.erl +@@ -165,14 +165,25 @@ parse4([], Key, Val, Ts) -> + is_digesturi_valid(DigestURICase, JabberDomain, JabberFQDN) -> + DigestURI = stringprep:tolower(DigestURICase), + case catch string:tokens(DigestURI, "/") of +- ["xmpp", Host] when (Host == JabberDomain) or (Host == JabberFQDN) -> +- true; +- ["xmpp", Host, ServName] when (ServName == JabberDomain) and (Host == JabberFQDN) -> +- true; ++ ["xmpp", Host] -> ++ IsHostFqdn = is_host_fqdn(Host, JabberFQDN), ++ (Host == JabberDomain) or IsHostFqdn; ++ ["xmpp", Host, ServName] -> ++ IsHostFqdn = is_host_fqdn(Host, JabberFQDN), ++ (ServName == JabberDomain) and IsHostFqdn; + _ -> + false + end. + ++is_host_fqdn(Host, [Letter | _Tail] = Fqdn) when not is_list(Letter) -> ++ Host == Fqdn; ++is_host_fqdn(_Host, []) -> ++ false; ++is_host_fqdn(Host, [Fqdn | _FqdnTail]) when Host == Fqdn -> ++ true; ++is_host_fqdn(Host, [Fqdn | FqdnTail]) when Host /= Fqdn -> ++ is_host_fqdn(Host, FqdnTail). ++ + get_local_fqdn() -> + case (catch get_local_fqdn2()) of + Str when is_list(Str) -> Str; +-- +1.7.9.5 +