Skip to content

Commit

Permalink
Merge pull request #1349 from serghey-rodin/add-caa-record
Browse files Browse the repository at this point in the history
Add CAA DNS record
  • Loading branch information
serghey-rodin committed May 14, 2019
2 parents 1e157d4 + 3d6eb2c commit faf7612
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions bin/v-add-dns-record
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
fi
fi

dvalue=${dvalue//\"/}
if [ $rtype != "CAA" ]; then
dvalue=${dvalue//\"/}

if [[ "$dvalue" =~ [\;[:space:]] ]]; then
dvalue='"'"$dvalue"'"'
if [[ "$dvalue" =~ [\;[:space:]] ]]; then
dvalue='"'"$dvalue"'"'
fi
fi

# Additional argument formatting
Expand Down
2 changes: 1 addition & 1 deletion func/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ is_dbuser_format_valid() {

# DNS record type validator
is_dns_type_format_valid() {
known_dnstype='A,AAAA,NS,CNAME,MX,TXT,SRV,DNSKEY,KEY,IPSECKEY,PTR,SPF,TLSA'
known_dnstype='A,AAAA,NS,CNAME,MX,TXT,SRV,DNSKEY,KEY,IPSECKEY,PTR,SPF,TLSA,CAA'
if [ -z "$(echo $known_dnstype |grep -w $1)" ]; then
check_result $E_INVALID "invalid dns record type format :: $1"
fi
Expand Down
1 change: 1 addition & 0 deletions web/templates/admin/add_dns_rec.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<option value="PTR" <?php if ($v_type == 'PTR') echo selected; ?>>PTR</option>
<option value="SPF" <?php if ($v_type == 'SPF') echo selected; ?>>SPF</option>
<option value="TLSA" <?php if ($v_type == 'TLSA') echo selected; ?>>TLSA</option>
<option value="CAA" <?php if ($v_type == 'CAA') echo selected; ?>>CAA</option>
</select>
</td>
</tr>
Expand Down

0 comments on commit faf7612

Please sign in to comment.