Prevent a basic hack.

dev
Philippe PITTOLI 2024-04-28 16:17:28 +02:00
parent 4606f852cc
commit ebd9bd75a5
1 changed files with 2 additions and 0 deletions

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