mirror of
https://github.com/nextcloud/server.git
synced 2026-02-25 19:04:38 -05:00
deny the usage of dots in database name
This commit is contained in:
parent
edf3503779
commit
bfb8436ca2
2 changed files with 4 additions and 1 deletions
|
|
@ -111,7 +111,7 @@
|
|||
</p>
|
||||
<p class="infield">
|
||||
<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>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ class OC_Setup {
|
|||
if(empty($options['dbname'])) {
|
||||
$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'])) {
|
||||
$error[] = "$dbprettyname set the database host.";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue