[patch] mod_http: Do not try to match invalid IP addresses.

3 views
Skip to first unread message

Boris Grozev

unread,
Jun 9, 2022, 2:24:14 PMJun 9
to proso...@googlegroups.com
Hi,

Attached is a small patch to avoid throwing an exception when the
Forwarded-For HTTP header contains something that doesn't parse as an
IP address.

/usr/share/lua/5.2/prosody/util/ip.lua:233: attempt to index local
'ipA' (a nil value)
stack traceback:
/usr/share/lua/5.2/prosody/util/ip.lua:233: in function 'match_ip'
/usr/lib/prosody/modules/mod_http.lua:272: in function
'is_trusted_proxy'
/usr/lib/prosody/modules/mod_http.lua:294: in function
'get_forwarded_connection_info'



Boris
do-not-match-invalid-ip.patch
Reply all
Reply to author
Forward
0 new messages