Sfoglia il codice sorgente

feat(webapp): allow target . in SRV

Peter Thomassen 4 anni fa
parent
commit
1e9c695d11
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      webapp/src/components/Field/Record/SRV.vue

+ 2 - 1
webapp/src/components/Field/Record/SRV.vue

@@ -2,7 +2,8 @@
 import { helpers, integer, between } from 'vuelidate/lib/validators';
 import Record from '../Record.vue';
 
-const hostname = helpers.regex('hostname', /^((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))[.]?$/);
+// Allow for root label only, see RFC 2052
+const hostname = helpers.regex('hostname', /^((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))?[.]?$/);
 const trailingDot = helpers.regex('trailingDot', /[.]$/);
 
 const MAX16 = 65535;