Restrict MySQL username and dbname with valid name

Change-Id: Id15db3e5bb279007b071083eeeec4f42b86f8f39
Fixes-bug: #1543939
This commit is contained in:
Swann Croiset 2016-02-11 11:47:34 +01:00
parent 14e572d449
commit fd26e81907
1 changed files with 4 additions and 4 deletions

View File

@ -113,8 +113,8 @@ attributes:
weight: 110
type: 'text'
regex:
source: '\S'
error: "You must provide the name of the database"
source: '^[a-zA-Z0-9$_]{1,64}$'
error: "You must provide the name of the database (maximum length: 64 characters)"
mysql_username:
value: 'grafana'
@ -123,8 +123,8 @@ attributes:
weight: 120
type: 'text'
regex:
source: '\S'
error: "You must provide a username"
source: '^[a-zA-Z0-9$_-]{1,16}$'
error: "You must provide a username (maximum length: 16 characters)"
mysql_password:
value: ''