[cl-xmpp-devel] Doesn't seem to work against ejabberd anymore

Robin Lee Powell rlpowell at digitalkingdom.org
Fri Mar 4 20:39:16 UTC 2011


Turns out to be a bug in cl-sasl; copying the author of that. The issue is that
authz-id is supposed to be optional, but it actually isn't set up that way.

Here's the patch:

--- /home/tmp/rlpowell/quicklisp/dists/quicklisp/software/cl-sasl_0.3/plain.lisp        2011-03-04 12:37:50.000000000 -0800
+++ /tmp/plain.lisp     2011-03-04 12:37:41.000000000 -0800
@@ -16,7 +16,7 @@
     (:start
      (setf (state c) :sent)
      (concatenate '(vector (unsigned-byte 8))
-                 (string-to-utf8 (authz-id c)) '(0)
+                 (string-to-utf8 (if (authz-id c) (authz-id c) (authc-id c))) '(0)
                  (string-to-utf8 (authc-id c)) '(0)
                  (string-to-utf8 (get-password (password c)))))

-Robin

On Fri, Mar 04, 2011 at 09:47:11AM -0800, Robin Lee Powell wrote:
> 
> 
> ejabberd 2.1.5 on Debian, cl-xmpp with SBCL, installed with
> quicklisp.
> 
> Plain auth just fails with a 503, as it always has for me against
> ejabberd; I gather plain auth isn't allowed anymore.
> 
> SASL, which used to work, fails for me like so:
> 
> <?xml version='1.0' ?><stream:stream to='chain.digitalkingdom.org' xmlns='jabber:client'
> +xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
> UNHANDLED: #<XML-ELEMENT STREAM:STREAM (6attr:0child:0data) {1004E66DD1}>
> UNHANDLED: #<XML-ELEMENT STREAM:FEATURES (0attr:4child:0data) {100448A401}>
> SASL state: START
> 
> debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" RUNNING
>                                              {1002D2E0F1}>:
>   The value NIL is not of type VECTOR.
> 
> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
> 
> restarts (invokable by number or by possibly-abbreviated name):
>   0: [ABORT] Exit debugger, returning to top level.
> 
> (SASL::STRING-TO-UTF8-LISP NIL)
> 0] backtrace
> 
> 0: (SASL::STRING-TO-UTF8-LISP NIL)
> 1: ((SB-PCL::FAST-METHOD SASL:CLIENT-STEP (SASL:PLAIN T))
>     #<unavailable argument>
>     #<unavailable argument>
>     #<SASL:PLAIN {1004EBFE11}>
>     #<unavailable argument>)
> 2: ((SB-PCL::FAST-METHOD CL-XMPP::INITIATE-SASL-AUTHENTICATION
>      (CL-XMPP:CONNECTION T T))
>     #<unavailable argument>
>     #<unavailable argument>
>     #<CL-XMPP:CONNECTION to chain.digitalkingdom.org:5222 (open) {1002DBD141}>
>     "PLAIN"
>     #<SASL:PLAIN {1004EBFE11}>)
> 3: ((SB-PCL::FAST-METHOD CL-XMPP::%SASL-PLAIN% (CL-XMPP:CONNECTION T T T))
>     #<unavailable argument>
>     #<unavailable argument>
>     #<CL-XMPP:CONNECTION to chain.digitalkingdom.org:5222 (open) {1002DBD141}>
>     "server"
>     "password"
>     #<unavailable argument>)
> 4: ((SB-PCL::FAST-METHOD CL-XMPP:AUTH (CL-XMPP:CONNECTION T T T))
>     #<unused argument>
>     #<unused argument>
>     #<CL-XMPP:CONNECTION to chain.digitalkingdom.org:5222 (open) {1002DBD141}>
>     "server"
>     "password"
>     "cl-xmpp server conn 1"
>     :MECHANISM
>     :SASL-PLAIN
>     :BIND-ET-AL
>     T
>     :SEND-PRESENCE
>     T)
> 5: ((SB-PCL::EMF CL-XMPP:AUTH)
>     #<unused argument>
>     #<unused argument>
>     #<CL-XMPP:CONNECTION to chain.digitalkingdom.org:5222 (open) {1002DBD141}>
>     "server"
>     "password"
>     "cl-xmpp server conn 1"
>     5864068327515
>     2)
> 6: (SB-INT:SIMPLE-EVAL-IN-LEXENV
>     (CL-XMPP:AUTH *CONNECTION* "server" "password" "cl-xmpp server conn 1"
>                   :MECHANISM :SASL-PLAIN)
>     #<NULL-LEXENV>)
> 7: (SB-FASL::LOAD-AS-SOURCE
>     #<SB-SYS:FD-STREAM
>       for "file /home/rlpowell/programming/caer_ganzu/benCity_server/server.lisp"
>       {1003DFA231}>
>     NIL
>     NIL)
> 8: ((FLET SB-FASL::LOAD-STREAM)
>     #<SB-SYS:FD-STREAM
>       for "file /home/rlpowell/programming/caer_ganzu/benCity_server/server.lisp"
>       {1003DFA231}>
>     NIL)
> 9: (LOAD
>     "server.lisp"
>     :VERBOSE
>     NIL
>     :PRINT
>     NIL
>     :IF-DOES-NOT-EXIST
>     T
>     :EXTERNAL-FORMAT
>     :DEFAULT)
> 10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LOAD "server.lisp") #<NULL-LEXENV>)
> 11: (INTERACTIVE-EVAL (LOAD "server.lisp") :EVAL NIL)
> 12: (SB-IMPL::REPL-FUN NIL)
> 13: ((LAMBDA ()))
> 14: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {1003DF3F99}>)
> 15: (SB-IMPL::TOPLEVEL-REPL NIL)
> 16: (SB-IMPL::TOPLEVEL-INIT)
> 17: ((LABELS SB-IMPL::RESTART-LISP))
> 
> 
> 
> 
> -- 
> http://singinst.org/ :  Our last, best hope for a fantastic future.
> Lojban (http://www.lojban.org/): The language in which "this parrot
> is dead" is "ti poi spitaki cu morsi", but "this sentence is false"
> is "na nei".   My personal page: http://www.digitalkingdom.org/rlp/
> 
> _______________________________________________
> cl-xmpp-devel mailing list
> cl-xmpp-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-xmpp-devel

-- 
http://singinst.org/ :  Our last, best hope for a fantastic future.
Lojban (http://www.lojban.org/): The language in which "this parrot
is dead" is "ti poi spitaki cu morsi", but "this sentence is false"
is "na nei".   My personal page: http://www.digitalkingdom.org/rlp/




More information about the cl-xmpp-devel mailing list