Compare commits

..

No commits in common. "723c1a83a0b03a8923f6133523758abea2a96287" and "4606f852ccded6e0017f1a826acd4a454929317d" have entirely different histories.

2 changed files with 1 additions and 7 deletions

View File

@ -51,11 +51,7 @@ class DNSManager::Client < IPC
def user_domain_add(domain : String) def user_domain_add(domain : String)
request = Request::NewDomain.new domain request = Request::NewDomain.new domain
send_now request send_now request
parse_message [ Response::DomainAdded, parse_message [ Response::Success ], read
Response::DomainAlreadyExists,
Response::InvalidDomainName,
Response::UnacceptableDomain
], read
end end
# Remove a domain. # Remove a domain.

View File

@ -133,8 +133,6 @@ class DNSManager::Storage
end end
matching_domains.each do |md| 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})" Baguette::Log.info "Add new domain #{domain} (matching domain #{md})"
end end