mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 02:12:58 +02:00
Forward Firewall: added remark field to custom hosts and host table
This commit is contained in:
committed by
Michael Tremer
parent
d0815ce43f
commit
e3580608b3
@@ -1763,13 +1763,13 @@ sub validremark
|
||||
if (length ($remark) < 1 || length ($remark) > 255) {
|
||||
return 0;}
|
||||
# Only valid characters are a-z, A-Z, 0-9 and -
|
||||
if ($remark !~ /^[a-zäöüA-ZÖÄÜ0-9-.:;_\/\s]*$/) {
|
||||
if ($remark !~ /^[a-zäöüA-ZÖÄÜ0-9-.:;\|_()\/\s]*$/) {
|
||||
return 0;}
|
||||
# First character can only be a letter or a digit
|
||||
if (substr ($remark, 0, 1) !~ /^[a-zäöüA-ZÖÄÜ0-9]*$/) {
|
||||
return 0;}
|
||||
# Last character can only be a letter or a digit
|
||||
if (substr ($remark, -1, 1) !~ /^[a-zöäüA-ZÖÄÜ0-9.]*$/) {
|
||||
if (substr ($remark, -1, 1) !~ /^[a-zöäüA-ZÖÄÜ0-9.:;_)]*$/) {
|
||||
return 0;}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user