Skip to content

Commit d925b32

Browse files
author
Till Brehm
committed
Merge branch 'master' into 'master'
allow ipv6 for remote-database-access See merge request !238
2 parents b79c5ba + ae90481 commit d925b32

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

install/tpl/nginx_apps.vhost.master

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
server {
22
listen {apps_vhost_ip}{apps_vhost_port};
3+
ssl {ssl_on};
4+
{ssl_comment}ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
5+
{ssl_comment}ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
6+
{ssl_comment}ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
7+
8+
# redirect to https if accessed with http
9+
{ssl_comment}error_page 497 https://$host:{vhost_port}$request_uri;
310

411
server_name {apps_vhost_servername};
512

@@ -199,4 +206,4 @@ server {
199206
alias /var/lib/mailman/archives/public;
200207
autoindex on;
201208
}
202-
}
209+
}

interface/lib/classes/validate_database.inc.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ function valid_ip_list($field_name, $field_value, $validator) {
4242
$values = explode(",", $field_value);
4343
foreach($values as $cur_value) {
4444
$cur_value = trim($cur_value);
45-
4645
$valid = true;
47-
// if(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $cur_value)) {
48-
if(preg_match("/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $cur_value)) {
49-
$groups = explode(".", $cur_value);
50-
foreach($groups as $group){
51-
if($group<0 or $group>255)
52-
$valid=false;
46+
if(function_exists('filter_var')) {
47+
if(!filter_var($field_value, FILTER_VALIDATE_IP)) {
48+
$valid = false;
5349
}
5450
} else {
55-
$valid = false;
51+
if(
52+
!preg_match("/^[0-9a-f]{1,4}:([0-9a-f]{0,4}:){1,6}[0-9a-f]{1,4}$/", $cur_value)
53+
&&
54+
!preg_match("/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/", $cur_value)) {
55+
$valid = false;
56+
}
5657
}
57-
5858
if($valid == false) {
5959
$errmsg = $validator['errmsg'];
6060
if(isset($app->tform->wordbook[$errmsg])) {

server/scripts/update_from_dev.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/bin/bash
22

33
cd /tmp
4+
rm -f ispconfig3-dev.tar.gz
45
wget -O ispconfig3-dev.tar.gz "http://git.ispconfig.org/ispconfig/ispconfig3/repository/archive.tar.gz?ref=master"
6+
rm -rf ispconfig3-master*
57
tar xzf ispconfig3-dev.tar.gz
6-
cd ispconfig3.git/install
8+
cd ispconfig3-master*/install
79
php -q \
810
-d disable_classes= \
911
-d disable_functions= \
1012
-d open_basedir= \
1113
update.php
1214
cd /tmp
13-
rm -rf /tmp/ispconfig3.git /tmp/ispconfig3-dev.tar.gz
15+
rm -rf /tmp/ispconfig3-master* /tmp/ispconfig3-dev.tar.gz
1416

15-
exit 0
17+
exit 0

0 commit comments

Comments
 (0)