0
0

🩹 Add domain length check to regex

This commit is contained in:
DrMaxNix 2021-04-03 15:59:12 +02:00 committed by GitHub
parent 2ad969b695
commit f0571463f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ function dnswatch_search() {
function is_valid_domain(str) {
let regex = /^([a-z0-9\-]+\.)+[a-z0-9]{2,}$/;
let regex = /^([a-z0-9\-]{1,64}\.){1,16}[a-z0-9]{2,}$/;
return regex.test(str);
}