[patch] mod_http: Do not try to match invalid IP addresses.
14 views
Skip to first unread message
Boris Grozev
unread,
Jun 9, 2022, 2:24:14 PM6/9/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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'