#866 mod_proxy65: No validation of config option types
Reporter
js
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Status-Fixed
Milestone-0.10
Type-Defect
js
on
Found this in the error log:
Mar 23 11:01:56 mod_c2s error Traceback[c2s]: /usr/lib/prosody/util/stanza.lua:206: bad argument #1 to 's_gsub' (string expected, got table)
stack traceback:
[C]: in function 's_gsub'
/usr/lib/prosody/util/stanza.lua:206: in function 'xml_escape'
/usr/lib/prosody/util/stanza.lua:220: in function 'self'
/usr/lib/prosody/util/stanza.lua:231: in function 'self'
/usr/lib/prosody/util/stanza.lua:231: in function '_dostring'
/usr/lib/prosody/util/stanza.lua:241: in function </usr/lib/prosody/util/stanza.lua:239>
[C]: in function 'tostring'
/usr/lib/prosody/core/sessionmanager.lua:38: in function 'send'
/usr/lib/prosody/modules/mod_proxy65.lua:142: in function '?'
/usr/lib/prosody/util/events.lua:67: in function </usr/lib/prosody/util/events.lua:63>
...
[C]: in function 'parse'
/usr/lib/prosody/util/xmppstream.lua:255: in function 'feed'
/usr/lib/prosody/modules/mod_c2s.lua:233: in function 'data'
/usr/lib/prosody/modules/mod_c2s.lua:255: in function </usr/lib/prosody/modules/mod_c2s.lua:252>
(tail call): ?
/usr/lib/prosody/net/server_select.lua:868: in function </usr/lib/prosody/net/server_select.lua:850>
[C]: in function 'xpcall'
/usr/bin/prosody:376: in function 'loop'
/usr/bin/prosody:407: in main chunk
[C]: ?
So far I don't know how to reproduce this and I don't know what the user/client (presumably) was doing when this was triggered.
This is with Prosody 0.9.12-1~jessie1
This seems to happen several times per day.
Zash
on
Hi, thanks for the report.
Could check what the configuration 'proxy65_address' is set to?
Changes
owner Zash
tags Status-NeedInfo
js
on
Hi, Thanks for the reply.
It is set to proxy65.xyz.td, which resolves to the host's public IP on which prosody is running (same as proxy65_interfaces below).
Component "proxy65.xyz.td" "proxy65"
proxy65_address = { "proxy65.xyz.td" }
proxy65_acl = { "xyz.td" }
proxy65_interfaces = { "1.2.3.4" }
Zash
on
The address setting is a string. You have set it to an array. You can fix it by removing the {} around the string.
Type checks have been added in the 0.10 branch:
https://hg.prosody.im/0.10/rev/e6968e47826d
Zash
on
Changes
titlebad argument #1 to 's_gsub' mod_proxy65: No validation of config option types
Found this in the error log: Mar 23 11:01:56 mod_c2s error Traceback[c2s]: /usr/lib/prosody/util/stanza.lua:206: bad argument #1 to 's_gsub' (string expected, got table) stack traceback: [C]: in function 's_gsub' /usr/lib/prosody/util/stanza.lua:206: in function 'xml_escape' /usr/lib/prosody/util/stanza.lua:220: in function 'self' /usr/lib/prosody/util/stanza.lua:231: in function 'self' /usr/lib/prosody/util/stanza.lua:231: in function '_dostring' /usr/lib/prosody/util/stanza.lua:241: in function </usr/lib/prosody/util/stanza.lua:239> [C]: in function 'tostring' /usr/lib/prosody/core/sessionmanager.lua:38: in function 'send' /usr/lib/prosody/modules/mod_proxy65.lua:142: in function '?' /usr/lib/prosody/util/events.lua:67: in function </usr/lib/prosody/util/events.lua:63> ... [C]: in function 'parse' /usr/lib/prosody/util/xmppstream.lua:255: in function 'feed' /usr/lib/prosody/modules/mod_c2s.lua:233: in function 'data' /usr/lib/prosody/modules/mod_c2s.lua:255: in function </usr/lib/prosody/modules/mod_c2s.lua:252> (tail call): ? /usr/lib/prosody/net/server_select.lua:868: in function </usr/lib/prosody/net/server_select.lua:850> [C]: in function 'xpcall' /usr/bin/prosody:376: in function 'loop' /usr/bin/prosody:407: in main chunk [C]: ? So far I don't know how to reproduce this and I don't know what the user/client (presumably) was doing when this was triggered. This is with Prosody 0.9.12-1~jessie1 This seems to happen several times per day.
Hi, thanks for the report. Could check what the configuration 'proxy65_address' is set to?
ChangesHi, Thanks for the reply. It is set to proxy65.xyz.td, which resolves to the host's public IP on which prosody is running (same as proxy65_interfaces below). Component "proxy65.xyz.td" "proxy65" proxy65_address = { "proxy65.xyz.td" } proxy65_acl = { "xyz.td" } proxy65_interfaces = { "1.2.3.4" }
The address setting is a string. You have set it to an array. You can fix it by removing the {} around the string. Type checks have been added in the 0.10 branch: https://hg.prosody.im/0.10/rev/e6968e47826d
bad argument #1 to 's_gsub'mod_proxy65: No validation of config option types