Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 2397:da8d6ab0c8b4
mod_saslauth: Sanitize debugging information so it won't break terminal emulation when using GSSAPI auth.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Wed, 23 Dec 2009 23:09:44 +0100 |
parent | 2395:7d7618c21321 |
child | 2398:44f694ce6aec |
comparison
equal
deleted
inserted
replaced
2396:39b2523bcf44 | 2397:da8d6ab0c8b4 |
---|---|
119 return; -- FIXME ignoring out of order stanzas because ejabberd does | 119 return; -- FIXME ignoring out of order stanzas because ejabberd does |
120 end | 120 end |
121 local text = stanza[1]; | 121 local text = stanza[1]; |
122 if text then | 122 if text then |
123 text = base64.decode(text); | 123 text = base64.decode(text); |
124 log("debug", "%s", text); -- FIXME: binary output will screw up the terminal | 124 log("debug", "%s", text:gsub("[%z\001-\009\011\012\014-\031]", " ")); |
125 if not text then | 125 if not text then |
126 session.sasl_handler = nil; | 126 session.sasl_handler = nil; |
127 session.send(build_reply("failure", "incorrect-encoding")); | 127 session.send(build_reply("failure", "incorrect-encoding")); |
128 return; | 128 return; |
129 end | 129 end |