deny the usage of dots in database name
This commit is contained in:
parent
b8a48b55a3
commit
d7a6b09406
|
@ -111,7 +111,7 @@
|
||||||
</p>
|
</p>
|
||||||
<p class="infield">
|
<p class="infield">
|
||||||
<label for="dbname" class="infield"><?php echo $l->t( 'Database name' ); ?></label>
|
<label for="dbname" class="infield"><?php echo $l->t( 'Database name' ); ?></label>
|
||||||
<input type="text" name="dbname" id="dbname" value="<?php print OC_Helper::init_var('dbname'); ?>" autocomplete="off" />
|
<input type="text" name="dbname" id="dbname" value="<?php print OC_Helper::init_var('dbname'); ?>" autocomplete="off" pattern="[0-9a-zA-Z$_]+" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -70,6 +70,9 @@ class OC_Setup {
|
||||||
if(empty($options['dbname'])) {
|
if(empty($options['dbname'])) {
|
||||||
$error[] = "$dbprettyname enter the database name.";
|
$error[] = "$dbprettyname enter the database name.";
|
||||||
}
|
}
|
||||||
|
if(substr_count($options['dbname'], '.') >= 1){
|
||||||
|
$error[] = "$dbprettyname you may not use dots in the database name";
|
||||||
|
}
|
||||||
if($dbtype != 'oci' && empty($options['dbhost'])) {
|
if($dbtype != 'oci' && empty($options['dbhost'])) {
|
||||||
$error[] = "$dbprettyname set the database host.";
|
$error[] = "$dbprettyname set the database host.";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue