Commit 378d8326 authored by Florian Schaal's avatar Florian Schaal
Browse files

disallow spf, dkim, and dmarc-records when editing / creating a TXT record

parent 7255ec92
......@@ -105,24 +105,31 @@ $form["tabs"]['dns'] = array (
'data' => array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'),
'validators' => array (
0 => array (
'type' => 'NOTEMPTY',
'errmsg'=> 'data_error_empty'
),
1 => array (
'type' => 'REGEX',
'regex' => "/^((?!v=DKIM).)*$/s",
'errmsg'=> 'invalid_type_dkim'
),
2 => array (
'type' => 'REGEX',
'regex' => "/^((?!v=DMARC).)*$/s",
'errmsg'=> 'invalid_type_dmarc'),
3 => array (
'type' => 'REGEX',
'regex' => "/^((?!v=spf).)*$/s",
'errmsg'=> 'invalid_type_spf'
),
),
'default' => '',
'value' => '',
'width' => '30',
'maxlength' => '255'
),
/*
'aux' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'default' => '0',
'value' => '',
'width' => '10',
'maxlength' => '10'
),
*/
'ttl' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
......
<?php
$wb['server_id_txt'] = 'Server';
$wb['zone_txt'] = 'Zone';
$wb['name_txt'] = 'Hostname';
$wb['type_txt'] = 'type';
$wb['data_txt'] = 'Text';
$wb['ttl_txt'] = 'TTL';
$wb['active_txt'] = 'Active';
$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
$wb['name_error_empty'] = 'The hostname is empty.';
$wb['name_error_regex'] = 'The hostname has the wrong format.';
$wb['data_error_empty'] = 'Text empty';
$wb['data_error_regex'] = 'Text format invalid';
$wb["server_id_txt"] = 'Server';
$wb["zone_txt"] = 'Zone';
$wb["name_txt"] = 'Hostname';
$wb["type_txt"] = 'type';
$wb["data_txt"] = 'Text';
$wb["ttl_txt"] = 'TTL';
$wb["active_txt"] = 'Active';
$wb["limit_dns_record_txt"] = 'The max. number of DNS records for your account is reached.';
$wb["no_zone_perm"] = 'You do not have the permission to add a record to this DNS zone.';
$wb["name_error_empty"] = 'The hostname is empty.';
$wb["name_error_regex"] = 'The hostname has the wrong format.';
$wb["data_error_empty"] = 'Text empty';
$wb["data_error_regex"] = 'Text format invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.';
$wb['data_error_empty'] = 'Text empty';
$wb['data_error_regex'] = 'Text format invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname tem um formato inválido.';
$wb['data_error_empty'] = 'Endereço IP em branco';
$wb['data_error_regex'] = 'Endereço IP formato inválido';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,5 +13,7 @@ $wb['name_error_regex'] = 'Hostname má chybný formát.';
$wb['data_error_empty'] = 'Text je prázdný';
$wb['data_error_regex'] = 'Text má chybný formát';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Der Hostname hat das falsche Format.';
$wb['data_error_empty'] = 'Text ist leer';
$wb['data_error_regex'] = 'Textformat ungültig';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM ist nicht zulässig. Bitte den DKIM-Button nutzen';
$wb['invalid_type_dmarc'] = 'DMARC ist nicht zulässig. Bitte den DMARC-Button nutzen';
$wb['invalid_type_spf'] = 'SPF ist nicht zulässig. Bitte den SPF-Button nutzen';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Το hostname δεν έχει σωστή μορφοπ
$wb['data_error_empty'] = 'Το κείμενο δεν έχει οριστεί';
$wb['data_error_regex'] = 'Κείμενο με μη έγκυρη μορφοποίηση';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb["name_error_regex"] = 'The hostname has the wrong format.';
$wb["data_error_empty"] = 'Text empty';
$wb["data_error_regex"] = 'Text format invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
?>
\ No newline at end of file
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'El formato del nombre de la máquina es incorrecto.';
$wb['data_error_empty'] = 'Texto vacío.';
$wb['data_error_regex'] = 'Formato de texto no válido';
$wb['ttl_range_error'] = 'TTL mínimo es 60 segundos';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Verkkotunnus on vääränlainen.';
$wb['data_error_empty'] = 'Tekstikenttä on tyhjä';
$wb['data_error_regex'] = 'Tekstikenttä on vääränlainen';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Le format du nom d\'hôte est invalide.';
$wb['data_error_empty'] = 'Le texte est vide';
$wb['data_error_regex'] = 'Le format du texte est invalide';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,6 +13,7 @@ $wb['name_error_regex'] = 'Naziv hosta je u pogrešnom formatu.';
$wb['data_error_empty'] = 'TXT polje je prazno';
$wb['data_error_regex'] = 'Neispravan format TXT zapisa';
$wb['ttl_range_error'] = 'Minimalno TTL vrijeme je 60 sekundi.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.';
$wb['data_error_empty'] = 'Text empty';
$wb['data_error_regex'] = 'Text format invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Format nama host salah.';
$wb['data_error_empty'] = 'Teks kosong';
$wb['data_error_regex'] = 'Format teks tidak valid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.';
$wb['data_error_empty'] = 'Text empty';
$wb['data_error_regex'] = 'Text format invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'ホスト名の形式が不正です。';
$wb['data_error_empty'] = 'TXT を入力してください。';
$wb['data_error_regex'] = 'TXT の形式が不正です。';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'De hostnaam heeft een onjuist formaat.';
$wb['data_error_empty'] = 'Tekst is niet ingvuld';
$wb['data_error_regex'] = 'Tekst formaat ongeldig';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Nazwa serwera ma zły format.';
$wb['data_error_empty'] = 'Tekst jest pusty.';
$wb['data_error_regex'] = 'Tekst ma zły format.';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname tem um formato inválido.';
$wb['data_error_empty'] = 'Endereço-IP em branco';
$wb['data_error_regex'] = 'Endereço-IP formato inválido';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname in format gresit';
$wb['data_error_empty'] = 'Text necompletat';
$wb['data_error_regex'] = 'Format text invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Имя узла имеет неправильный
$wb['data_error_empty'] = 'Текст пустой';
$wb['data_error_regex'] = 'Формат неправилен';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.';
$wb['data_error_empty'] = 'Text empty';
$wb['data_error_regex'] = 'Text format invalid';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname má zlý formát.';
$wb['data_error_empty'] = 'Text je prázdny';
$wb['data_error_regex'] = 'Text má zlý formát';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
......@@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname yanlış formatta.';
$wb['data_error_empty'] = 'Metin boş';
$wb['data_error_regex'] = 'Metin geçersiz formatta';
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button';
$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button';
$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.';
?>
  • I have problem about that change. interface/web/dns/form/dns_txt.tform.php 'validators' "1": it does not allow to put DKIM entry directly using TXT record. But I can't use dedicated DKIM button when I don't have mail support on my account. There should be done one of two things:

    • allow using DKIM with TXT record directly
    • remove "read-only" from fields in "DKIM button"
  • You can add DKIM-Records as a TXT-Records. Just make sure, they are correct (match the regex).

  • No, I can't. I get "DKIM is not allowed. Use the DKIM button." message.

  • I just check this with the latest version. I can create a TXT-Record with default._domainkey..... and v=DKIM1; t=s; p=MI...

  • Well - it does not work, simply. I can't add it. Recent ispconfig version.

    validator 1 for field "data" causes that you can't add proper entry. 'regex' => "/^((?!v=DKIM).)*$/s",

    I'm trying to add TXT record default._domainkey.... and: v=DKIM1; p=MIGfMA0GCS.......

    After removing validator number "1" - it works...

    Funny thing is that it works for domain when you have dkim record already existing.

    Edited by Paweł G.
  • Mentioned in issue #4626 (closed)

    Toggle commit list
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment