What steps will reproduce the problem?
1. Open a BOSH stream with non-normal form of host JID in 'to' attribute.
What is the expected output?
Either everything being fine or an improper-addressing error.
What do you see instead?
Traceback[httpserver]: plugins/mod_bosh.lua:299: attempt to index field '?' (a nil value)
stack traceback:
[C]: in function 'parse'
./util/xmppstream.lua:271: in function 'feed'
plugins/mod_bosh.lua:136: in function '?'
./util/events.lua:78: in function <./util/events.lua:74>
(...tail calls...)
./net/http/server.lua:239: in function <./net/http/server.lua:180>
(...tail calls...)
[C]: in function 'xpcall'
./net/http/server.lua:112: in function 'process_next'
./net/http/server.lua:128: in function 'success_cb'
./net/http/parser.lua:177: in function 'feed'
./net/http/server.lua:159: in function <./net/http/server.lua:158>
(...tail calls...)
./net/server_select.lua:879: in function <./net/server_select.lua:861>
[C]: in function 'xpcall'
./prosody:400: in function 'loop'
./prosody:431: in main chunk
[C]: in ?
What version of the product are you using?
0.10 b0093d3b2d04
Please provide any additional information below.
The 'to' attribute is correctly validated, normalized using nameprep, but then the original attribute value is set as session.host, which is used to index prosody.hosts, which causes the above error.
What steps will reproduce the problem? 1. Open a BOSH stream with non-normal form of host JID in 'to' attribute. What is the expected output? Either everything being fine or an improper-addressing error. What do you see instead? Traceback[httpserver]: plugins/mod_bosh.lua:299: attempt to index field '?' (a nil value) stack traceback: [C]: in function 'parse' ./util/xmppstream.lua:271: in function 'feed' plugins/mod_bosh.lua:136: in function '?' ./util/events.lua:78: in function <./util/events.lua:74> (...tail calls...) ./net/http/server.lua:239: in function <./net/http/server.lua:180> (...tail calls...) [C]: in function 'xpcall' ./net/http/server.lua:112: in function 'process_next' ./net/http/server.lua:128: in function 'success_cb' ./net/http/parser.lua:177: in function 'feed' ./net/http/server.lua:159: in function <./net/http/server.lua:158> (...tail calls...) ./net/server_select.lua:879: in function <./net/server_select.lua:861> [C]: in function 'xpcall' ./prosody:400: in function 'loop' ./prosody:431: in main chunk [C]: in ? What version of the product are you using? 0.10 b0093d3b2d04 Please provide any additional information below. The 'to' attribute is correctly validated, normalized using nameprep, but then the original attribute value is set as session.host, which is used to index prosody.hosts, which causes the above error.
Fixed in https://hg.prosody.im/0.10/rev/4a5ff09887a4
Changes