[Pkg-owncloud-commits] [owncloud] 17/394: deny the usage of dots in database name

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:11:17 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit bfb8436ca223d0401f2b7ff001cb9152387ca82d
Author: Georg Ehrke <dev at georgswebsite.de>
Date:   Sun Oct 28 14:11:41 2012 +0100

    deny the usage of dots in database name
---
 core/templates/installation.php |    2 +-
 lib/setup.php                   |    3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/core/templates/installation.php b/core/templates/installation.php
index c0b29ea..5a3bd2c 100644
--- a/core/templates/installation.php
+++ b/core/templates/installation.php
@@ -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; ?>
diff --git a/lib/setup.php b/lib/setup.php
index 716b0ef..810977a 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -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.";
 			}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list