Added jail name validation
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.0.48......Added jail name validation.
|
||||||
1.0.47......Cosmetic changes, display notify on success.
|
1.0.47......Cosmetic changes, display notify on success.
|
||||||
1.0.46......Added simple page for quick jail config, cosmetic changes.
|
1.0.46......Added simple page for quick jail config, cosmetic changes.
|
||||||
1.0.45......Minor cosmetic changes.
|
1.0.45......Minor cosmetic changes.
|
||||||
|
|||||||
@@ -100,6 +100,12 @@ if ($_POST):
|
|||||||
|
|
||||||
// Input validation.
|
// Input validation.
|
||||||
// Perform some simple validations for now.
|
// Perform some simple validations for now.
|
||||||
|
if(isset($_POST['jname']) && ($pconfig['jname'])):
|
||||||
|
if(!preg_match('/^[A-Za-z0-9-_]+$/D', $pconfig['jname'])):
|
||||||
|
$input_errors[] = gtext("A valid jail name must be specified.");
|
||||||
|
endif;
|
||||||
|
endif;
|
||||||
|
|
||||||
if(isset($_POST['hostname']) && ($pconfig['hostname'])):
|
if(isset($_POST['hostname']) && ($pconfig['hostname'])):
|
||||||
if(preg_match('/\s/', $pconfig['hostname'])):
|
if(preg_match('/\s/', $pconfig['hostname'])):
|
||||||
$input_errors[] = gtext("A valid hostname must be specified.");
|
$input_errors[] = gtext("A valid hostname must be specified.");
|
||||||
|
|||||||
Reference in New Issue
Block a user