From: Adam Chlipala Date: Tue, 1 Jan 2008 21:44:45 +0000 (+0000) Subject: Warn about requesting www.* domains X-Git-Url: https://git.hcoop.net/bpt/portal.git/commitdiff_plain/06e14693089d7b16c51d9402d642509e447a5dba?hp=0c4ae84029732bad686aeb2b21feb8e5fe0b15c7 Warn about requesting www.* domains --- diff --git a/domain.mlt b/domain.mlt index 78dc955..99b6a8e 100644 --- a/domain.mlt +++ b/domain.mlt @@ -4,14 +4,19 @@ val admin = Group.inGroupName "server"; if $"req" <> "" then val dom = $"req"; - if Util.validDomain dom then + if not (Util.validDomain dom) then + %>

Invalid domain name

<% + elseif String.isPrefix "www." dom and $"want_www" = "" then + val base = String.extract (dom, 4, NONE) + %>

Are you sure you want to request a domain that begins with "www."?

+

You probably meant to request <% base %> instead, which would grant you the ability to configure <% dom %> as well. Unless you've registered <% dom %> directly with your registrar, you will be unable to configure it without the right to set nameservers for <% base %>.

+

">Yes, go ahead and place the request!

<% + else val id = Domain.add (Init.getUserId(), dom, $"msg"); if not (Domain.notifyNew id) then %>

Error sending e-mail notification

<% end %>

Request added

<% - else - %>

Invalid domain name

<% end elseif $"cmd" = "open" then