Prevent a basic hack.

This commit is contained in:
Philippe PITTOLI 2024-04-28 16:17:28 +02:00
parent 4606f852cc
commit ebd9bd75a5

View File

@ -133,6 +133,8 @@ class DNSManager::Storage
end
matching_domains.each do |md|
# Prevent empty domains (from crafted requests) to be accepted.
return Response::InvalidDomainName.new unless (domain.chomp md).size > 2
Baguette::Log.info "Add new domain #{domain} (matching domain #{md})"
end