[ejabberd] Re: cyrsasl_digest and gsasl
martin at truffulatree.org
Thu Aug 11 21:30:22 MSD 2005
Alexey Shchepin <alexey at sevcom.net> writes:
> On Wed, 10 Aug 2005 19:15:09 +0000 (UTC), you said:
> MP> username="martin", , nonce="2874065148",
> MP> cnonce="N41ZoPnBdq61JnqkP0r/LQ==", nc=00000001, qop=auth,
> MP> digest-uri="xmpp/localhost", response=f9b98eab077439243b70e0be68ce4296, ,
> MP> charset=utf-8, , authzid="martin"
> MP> While something of a wart in libgsasl, this seems to be a valid response
> MP> (which is the claim in a comment in the libgsasl source
> MP> code).
> Well, according to RFC2831 that string should match this ABNF rule, which
> doesn't allow things like ", ,":
> ( *LWS element *( *LWS "," *LWS element ))
And the RFC continues:
( *LWS element *( *LWS "," *LWS element ))
can be shown as
Wherever this construct is used, null elements are allowed, but do
not contribute to the count of elements present. That is,
"(element), , (element) " is permitted, but counts as only two
elements. Therefore, where at least one element is required, at
least one non-null element MUST be present.
I'm no expert at this sort of thing, but this was a good opportunity for me to
learn something. It appears to me that the "augmented ABNF" defined in the RFC
makes a special allowance for null elements. In any case, since you've accepted
the changes to accomodate libgsasl's output, it's not very important to me now.
> I just committed your patch with a few changes, so now ejabberd will process
> that string without a error.
Great, and thanks.
More information about the ejabberd