Skip to content
Snippets Groups Projects
Commit 8b32612c authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch '3443-firewall' into 'develop'

Don't allow spaces in firewall rule (#3443)

Closes #3443

See merge request ispconfig/ispconfig3!1192
parents 68e4346f 7b4daf02
No related branches found
No related tags found
No related merge requests found
Showing
with 27 additions and 28 deletions
......@@ -76,7 +76,7 @@ $form["tabs"]['firewall'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^[\s0-9\,\:]{0,255}$/',
'regex' => '/^\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
'errmsg'=> 'tcp_ports_error_regex'),
),
'default' => '20,21,22,25,53,80,110,143,443,465,587,993,995,3306,8080,8081,10000',
......@@ -88,8 +88,8 @@ $form["tabs"]['firewall'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^[\s0-9\,\:]{0,255}$/',
'errmsg'=> 'tcp_ports_error_regex'),
'regex' => '/^\d{1,5}(?::\d{1,5})?(?:,\d{1,5}(?::\d{1,5})?)*$/',
'errmsg'=> 'udp_ports_error_regex'),
),
'default' => '53,3306',
'value' => '',
......
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Separated by comma';
$wb['udp_port_help_txt'] = 'Separated by comma';
$wb['active_txt'] = 'Active';
$wb['firewall_error_unique'] = 'There is already a firewall record for this server.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, : and ,.';
$wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, : and ,.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in TCP port definition. Allowed characters are numbers, colons (:) and commas.';
$wb['udp_ports_error_regex'] = 'Character not allowed in UDP port definition. Allowed characters are numbers, colons (:) and commas.';
?>
<?php
$wb['server_id_txt'] = 'Servidor';
$wb['tcp_port_txt'] = 'Portas tcp abertas';
$wb['udp_port_txt'] = 'Portas udp abertas';
$wb['tcp_port_txt'] = 'Portas TCP abertas';
$wb['udp_port_txt'] = 'Portas UDP abertas';
$wb['tcp_port_help_txt'] = 'Separado por vírgula';
$wb['udp_port_help_txt'] = 'Separado por vírgula';
$wb['active_txt'] = 'Ativo';
......
......@@ -2,7 +2,7 @@
$wb['list_head_txt'] = 'Firewall';
$wb['active_txt'] = 'Ativo';
$wb['server_id_txt'] = 'Servidor';
$wb['tcp_port_txt'] = 'Portas tcp abertas';
$wb['udp_port_txt'] = 'Portas udp abertas';
$wb['tcp_port_txt'] = 'Portas TCP abertas';
$wb['udp_port_txt'] = 'Portas UDP abertas';
$wb['add_new_record_txt'] = 'Adicionar nova regra';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Separated by comma';
$wb['udp_port_help_txt'] = 'Separated by comma';
$wb['active_txt'] = 'Active';
$wb['firewall_error_unique'] = 'There is already a firewall record for this server.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, \\":\\" and \\",\\".';
$wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, \\":\\" and \\",\\".';
$wb['tcp_ports_error_regex'] = 'Character not allowed in TCP port definition. Allowed characters are numbers, \\":\\" and \\",\\".';
$wb['udp_ports_error_regex'] = 'Character not allowed in UDP port definition. Allowed characters are numbers, \\":\\" and \\",\\".';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Adskilt af komma';
$wb['udp_port_help_txt'] = 'Adskilt af komma';
$wb['active_txt'] = 'Aktiv';
$wb['firewall_error_unique'] = 'Der er allerede en firewall post for denne server.';
$wb['tcp_ports_error_regex'] = 'Tegn ikke tilladt i tcp port definition. Tilladt tegn er tal, \\":\\" og \\",\\".';
$wb['udp_ports_error_regex'] = 'Tegn ikke tilladt i udp port definition. Tilladt tegn er tal, \\":\\" og \\",\\".';
$wb['tcp_ports_error_regex'] = 'Tegn ikke tilladt i TCP port definition. Tilladt tegn er tal, \\":\\" og \\",\\".';
$wb['udp_ports_error_regex'] = 'Tegn ikke tilladt i UDP port definition. Tilladt tegn er tal, \\":\\" og \\",\\".';
?>
......@@ -6,7 +6,6 @@ $wb['tcp_port_help_txt'] = 'Separated by comma';
$wb['udp_port_help_txt'] = 'Separated by comma';
$wb['active_txt'] = 'Active';
$wb['firewall_error_unique'] = 'There is already a firewall record for this server.';
$wb['active_txt'] = 'Active';
$wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, ":" and ",".';
$wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, ":" and ",".';
?>
\ No newline at end of file
$wb['tcp_ports_error_regex'] = 'Character not allowed in TCP port definition. Allowed characters are numbers, colons (:) and commas.';
$wb['udp_ports_error_regex'] = 'Character not allowed in UDP port definition. Allowed characters are numbers, colons (:) and commas.';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Vesszővel elválasztva';
$wb['udp_port_help_txt'] = 'Vesszővel elválasztva';
$wb['active_txt'] = 'Aktív';
$wb['firewall_error_unique'] = 'There is already a firewall record for this server.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, : and ,.';
$wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, : and ,.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in TCP port definition. Allowed characters are numbers, colons (:) and commas.';
$wb['udp_ports_error_regex'] = 'Character not allowed in UDP port definition. Allowed characters are numbers, colons (:) and commas.';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Dipisahkan oleh koma';
$wb['udp_port_help_txt'] = 'Dipisahkan oleh koma';
$wb['active_txt'] = 'Aktif';
$wb['firewall_error_unique'] = 'Telah ada record firewall untuk server ini.';
$wb['tcp_ports_error_regex'] = 'Karakter di definisi port tcp tidak diperbolehkan. Karakter yang diizinkan adalah angka, : dan ,.';
$wb['udp_ports_error_regex'] = 'Karakter di definisi port udp tidak diperbolehkan. Karakter yang diizinkan adalah angka, : dan ,.';
$wb['tcp_ports_error_regex'] = 'Karakter di definisi port TCP tidak diperbolehkan. Karakter yang diizinkan adalah angka, : dan ,.';
$wb['udp_ports_error_regex'] = 'Karakter di definisi port UDP tidak diperbolehkan. Karakter yang diizinkan adalah angka, : dan ,.';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Separate dalla virgola';
$wb['udp_port_help_txt'] = 'Separate dalle virgola';
$wb['active_txt'] = 'Attivo';
$wb['firewall_error_unique'] = 'Esiste già un record firewall per questo server.';
$wb['tcp_ports_error_regex'] = 'Carattere non ammesso nella definizione di tcp port. Caratteri ammessi sono numeri, : e ,.';
$wb['udp_ports_error_regex'] = 'Carattere non ammesso nella definizione di udp port. Caratteri ammessi sono numeri, : and ,.';
$wb['tcp_ports_error_regex'] = 'Carattere non ammesso nella definizione di TCP port. Caratteri ammessi sono numeri, : e ,.';
$wb['udp_ports_error_regex'] = 'Carattere non ammesso nella definizione di UDP port. Caratteri ammessi sono numeri, : and ,.';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Separated by comma';
$wb['udp_port_help_txt'] = 'Separated by comma';
$wb['active_txt'] = 'Active';
$wb['firewall_error_unique'] = 'There is already a firewall record for this server.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, : and ,.';
$wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, : and ,.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in TCP port definition. Allowed characters are numbers, colons (:) and commas.';
$wb['udp_ports_error_regex'] = 'Character not allowed in UDP port definition. Allowed characters are numbers, colons (:) and commas.';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Перечислить порты TCP через з
$wb['udp_port_help_txt'] = 'Перечислить порты UDP через запятую';
$wb['active_txt'] = 'Активно';
$wb['firewall_error_unique'] = 'Уже есть такая запись брандмауэра для этого сервера.';
$wb['tcp_ports_error_regex'] = 'Недопустимый символ в указании tcp порта. Корректные сиволы - цифры, \\":\\" и \\",\\"';
$wb['tcp_ports_error_regex'] = 'Недопустимый символ в указании TCP порта. Корректные сиволы - цифры, \\":\\" и \\",\\"';
$wb['udp_ports_error_regex'] = 'Некорректный символ в указании UDP порта. Допустимые сиволы - цифры, \\":\\" и \\",\\"';
?>
......@@ -6,6 +6,6 @@ $wb['tcp_port_help_txt'] = 'Kommaseparerade';
$wb['udp_port_help_txt'] = 'Kommaseparerade';
$wb['active_txt'] = 'Aktiv';
$wb['firewall_error_unique'] = 'Det finns redan ett brandväggsinlägg för den här servern';
$wb['tcp_ports_error_regex'] = 'Character not allowed in tcp port definition. Allowed characters are numbers, : and ,.';
$wb['udp_ports_error_regex'] = 'Character not allowed in udp port definition. Allowed characters are numbers, : and ,.';
$wb['tcp_ports_error_regex'] = 'Character not allowed in TCP port definition. Allowed characters are numbers, colons (:) and commas.';
$wb['udp_ports_error_regex'] = 'Character not allowed in UDP port definition. Allowed characters are numbers, colons (:) and commas.';
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment