1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Adding Local DNS Records does not add to /etc/pihole/custom.list

Fixes #5268

Signed-off-by: MrDuck2742 <jim@datachord.co.uk>
This commit is contained in:
MrDuck2742 2023-05-05 22:05:56 +01:00
parent 741717aa38
commit b8c3f6d999
No known key found for this signature in database
GPG Key ID: 10F3AFED99585B4E

View File

@ -622,7 +622,7 @@ checkDomain()
local domain validDomain local domain validDomain
# Convert to lowercase # Convert to lowercase
domain="${1,,}" domain="${1,,}"
validDomain=$(grep -P "^((-|_)*[a-z\\d]((-|_)*[a-z\\d])*(-|_)*)(\\.(-|_)*([a-z\\d]((-|_)*[a-z\\d])*))*$" <<< "${domain}") # Valid chars check validDomain=$(grep -P "^((-|_)*[a-z0-9]((-|_)*[a-z0-9)*(-|_)*)(\\.(-|_)*([a-z0-9]((-|_)*[a-z0-9])*))*$" <<< "${domain}") # Valid chars check
validDomain=$(grep -P "^[^\\.]{1,63}(\\.[^\\.]{1,63})*$" <<< "${validDomain}") # Length of each label validDomain=$(grep -P "^[^\\.]{1,63}(\\.[^\\.]{1,63})*$" <<< "${validDomain}") # Length of each label
echo "${validDomain}" echo "${validDomain}"
} }