brahmi2 / prosody-modules

Automatically exported from code.google.com/p/prosody-modules
MIT License
0 stars 0 forks source link

[mod_onions] crash on connection failure under certain circumstances #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
* What steps will reproduce the problem?

1. A connection over TOR fails
2. There are certain stanzas in the send queue

* What is the expected output? What do you see instead?

Prosody crashes (in my case with a segfault, but I think there are other issues 
with my installation which make prosody segfault on errors which should cause a 
stacktrace)

* What version of the product are you using? On what operating system?

Prosody 0.9-tip with mod_onions from prosody-modules tip

* Please provide any additional information below.

mod_onions's bounce_sendq() currently doesn't check the stanza type before 
giving them to core_process_stanza(). If it is then given to 
handle_unhandled_stanza() and the stanza isn't a message, presence or iq, 
origin:close() will be called on the dummy origin.

To fix this, I've attached a patch which synchonizes the bounce_sendq() version 
from mod_onions with the one in mod_s2s/mod_s2s.lua, so that other stanza types 
will be ignored.

In addition, core_process_stanza is changed to prosody.core_process_stanza to 
get rid of the deprecated warnings.

Original issue reported on code.google.com by neora...@gmail.com on 6 Jan 2015 at 9:27

Attachments: