From c1fcaed2ee8f05a5030fe4e8e211ca4eae7a9489 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 11 Jun 2013 11:44:57 -0400
Subject: [PATCH] - Fixed FS#2921 - RBL list field in server config can not be empty.
---
interface/web/sites/form/web_vhost_subdomain.tform.php | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/interface/web/sites/form/web_vhost_subdomain.tform.php b/interface/web/sites/form/web_vhost_subdomain.tform.php
index 9c6bfa6..190a55b 100644
--- a/interface/web/sites/form/web_vhost_subdomain.tform.php
+++ b/interface/web/sites/form/web_vhost_subdomain.tform.php
@@ -149,7 +149,7 @@
'web_folder' => array (
'datatype' => 'VARCHAR',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '@^([\w/_\.\-]{1,100})$@',
+ 'regex' => '@^((?!.*\.\.)[\w/_\.\-]{1,100})$@',
'errmsg'=> 'web_folder_error_regex'),
),
'formtype' => 'TEXT',
@@ -167,13 +167,7 @@
'hd_quota' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
- 'errmsg'=> 'hd_quota_error_empty'),
- 1 => array ( 'type' => 'REGEX',
- 'regex' => '/^(\-1|[0-9]{1,10})$/',
- 'errmsg'=> 'hd_quota_error_regex'),
- ),
- 'default' => '-1',
+ 'default' => '0',
'value' => '',
'width' => '7',
'maxlength' => '7'
@@ -296,7 +290,7 @@
'redirect_path' => array (
'datatype' => 'VARCHAR',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '@^(([\.]{0})|((ftp|https?)://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@',
+ 'regex' => '@^(([\.]{0})|((ftp|https?)://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
'errmsg'=> 'redirect_error_regex'),
),
'formtype' => 'TEXT',
--
Gitblit v1.9.1