Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 6364:4e93e8768c36
mod_c2s, mod_s2s: Log received invalid stream headers
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 23 Aug 2014 09:29:17 +0100 |
parent | 6362:f5f44504e18b |
child | 6367:769a3577dd85 |
child | 6378:3cec0eef0b70 |
comparison
equal
deleted
inserted
replaced
6363:ec446efc15e1 | 6364:4e93e8768c36 |
---|---|
405 session:close(false); | 405 session:close(false); |
406 end | 406 end |
407 | 407 |
408 function stream_callbacks.error(session, error, data) | 408 function stream_callbacks.error(session, error, data) |
409 if error == "no-stream" then | 409 if error == "no-stream" then |
410 session.log("debug", "Invalid opening stream header (%s)", (data:gsub("^([^\1]+)\1", "{%1}"))); | |
410 session:close("invalid-namespace"); | 411 session:close("invalid-namespace"); |
411 elseif error == "parse-error" then | 412 elseif error == "parse-error" then |
412 session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); | 413 session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); |
413 session:close("not-well-formed"); | 414 session:close("not-well-formed"); |
414 elseif error == "stream-error" then | 415 elseif error == "stream-error" then |