# HG changeset patch # User Kim Alvefur # Date 1774174842 -3600 # Node ID 4ed802e45af6f6329918c7807b7be471d4ac8e8d # Parent a1fb05cbd44eac2faaf5ebbcc1c7bdbbcb772d1f mod_s2s_auth_dane_in: Don't attempt DANCE with IP addresses (fixes #1988) DNS lookups based on IP addresses do not work. Backported from b0c31a5d8276 diff -r a1fb05cbd44e -r 4ed802e45af6 plugins/mod_s2s_auth_dane_in.lua --- a/plugins/mod_s2s_auth_dane_in.lua Sat Mar 14 01:19:27 2026 +0100 +++ b/plugins/mod_s2s_auth_dane_in.lua Sun Mar 22 11:20:42 2026 +0100 @@ -4,6 +4,7 @@ local async = require "prosody.util.async"; local encodings = require "prosody.util.encodings"; local hashes = require "prosody.util.hashes"; +local inet_pton = require "prosody.util.net".pton; local promise = require "prosody.util.promise"; local x509 = require "prosody.util.x509"; @@ -68,6 +69,11 @@ return end + if inet_pton(host) or host:sub(1,1) == '[' then + -- No DANCEing with IP literals + return + end + local by_select_match = { [0] = lazy_hash { -- cert