changeset 14061:b0c31a5d8276

mod_s2s_auth_dane_in: Don't attempt DANCE with IP addresses DNS lookups based on IP addresses do not work.
author Kim Alvefur <zash@zash.se>
date Fri, 30 Jan 2026 22:02:31 +0100
parents 6bf989c6fa3a
children e73fdb09f080
files plugins/mod_s2s_auth_dane_in.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s_auth_dane_in.lua	Sun Feb 08 17:47:57 2026 +0100
+++ b/plugins/mod_s2s_auth_dane_in.lua	Fri Jan 30 22:02:31 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";
 
@@ -63,6 +64,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