Merge pull request #488 from lucaswilric/ip-regex
Validate vhosts names more strictly
This commit is contained in:
@@ -104,7 +104,7 @@ __END__
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function update() {
|
function update() {
|
||||||
if ($("#vhost").is(":checked") && !isNaN($("#hostname").val()[0])) {
|
if ($("#vhost").is(":checked") && $("#hostname").val().match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
|
||||||
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
|
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
|
||||||
$("#vhost").prop('checked', false);
|
$("#vhost").prop('checked', false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user