Changeset 768
- Timestamp:
- 08/16/17 12:57:11 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r767 r768 983 983 ${$args{weight}} =~ s/\s*//g; 984 984 ${$args{port}} =~ s/\s*//g; 985 return ('FAIL',"Distance, port and weight are required, and must be numeric") 986 unless ${$args{weight}} =~ /^\d+$/ && ${$args{port}} =~ /^\d+$/; 985 my @ferr; 986 push @ferr, "distance" unless ${$args{dist}} =~ /^\d+$/; 987 push @ferr, "weight" unless ${$args{weight}} =~ /^\d+$/; 988 push @ferr, "port" unless ${$args{port}} =~ /^\d+$/; 989 return ('FAIL',"Distance, port and weight are required, and must be numeric (check ".join(",", @ferr).")") 990 unless ${$args{dist}} =~ /^\d+$/ && ${$args{weight}} =~ /^\d+$/ && ${$args{port}} =~ /^\d+$/; 987 991 988 992 ${$args{fields}} = "distance,weight,port,"; … … 4508 4512 4509 4513 # do simple validation first 4514 $ttl = '' if !$ttl; 4515 $ttl =~ s/\s*//g; 4510 4516 return ('FAIL', "TTL must be numeric") unless $ttl =~ /^-?\d+$/; 4511 4517 … … 4658 4664 4659 4665 # do simple validation first 4666 $ttl = '' if !$ttl; 4667 $ttl =~ s/\s*//g; 4660 4668 return ('FAIL', "TTL must be numeric") unless $ttl =~ /^-?\d+$/; 4661 4669
Note:
See TracChangeset
for help on using the changeset viewer.