Skip to content

Commit 1ed3fbd

Browse files
author
Wulff D. Heiss
committed
Change database username length to 32 from 16
1 parent bcb8eb1 commit 1ed3fbd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+58
-58
lines changed

interface/web/sites/database_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ function onBeforeUpdate() {
352352

353353
if ($app->tform->errorMessage == ''){
354354
/* restrict the names if there is no error */
355-
/* crop user and db names if they are too long -> mysql: user: 16 chars / db: 64 chars */
355+
/* crop user and db names if they are too long -> mysql: user: 32 chars / db: 64 chars */
356356
$this->dataRecord['database_name'] = substr($dbname_prefix . $this->dataRecord['database_name'], 0, 64);
357357
}
358358

interface/web/sites/database_user_edit.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function onBeforeUpdate() {
154154
//* Database username shall not be empty
155155
if($this->dataRecord['database_user'] == '') $app->tform->errorMessage .= $app->tform->wordbook["database_user_error_empty"].'<br />';
156156

157-
if(strlen($dbuser_prefix . $this->dataRecord['database_user']) > 16) $app->tform->errorMessage .= str_replace('{user}', htmlentities($dbuser_prefix . $this->dataRecord['database_user'], ENT_QUOTES, 'UTF-8'), $app->tform->wordbook["database_user_error_len"]).'<br />';
157+
if(strlen($dbuser_prefix . $this->dataRecord['database_user']) > 32) $app->tform->errorMessage .= str_replace('{user}', htmlentities($dbuser_prefix . $this->dataRecord['database_user'], ENT_QUOTES, 'UTF-8'), $app->tform->wordbook["database_user_error_len"]).'<br />';
158158

159159
//* Check database user against blacklist
160160
$dbuser_blacklist = array($conf['db_user'], 'mysql', 'root');
@@ -164,8 +164,8 @@ function onBeforeUpdate() {
164164

165165
if ($app->tform->errorMessage == ''){
166166
/* restrict the names if there is no error */
167-
/* crop user and db names if they are too long -> mysql: user: 16 chars / db: 64 chars */
168-
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16);
167+
/* crop user and db names if they are too long -> mysql: user: 32 chars / db: 64 chars */
168+
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 32);
169169
}
170170

171171
/* prepare password for MongoDB */
@@ -195,7 +195,7 @@ function onBeforeInsert() {
195195

196196
$this->dataRecord['database_user_prefix'] = $dbuser_prefix;
197197

198-
if(strlen($dbuser_prefix . $this->dataRecord['database_user']) > 16) $app->tform->errorMessage .= str_replace('{user}', htmlentities($dbuser_prefix . $this->dataRecord['database_user'], ENT_QUOTES, 'UTF-8'), $app->tform->wordbook["database_user_error_len"]).'<br />';
198+
if(strlen($dbuser_prefix . $this->dataRecord['database_user']) > 32) $app->tform->errorMessage .= str_replace('{user}', htmlentities($dbuser_prefix . $this->dataRecord['database_user'], ENT_QUOTES, 'UTF-8'), $app->tform->wordbook["database_user_error_len"]).'<br />';
199199

200200
//* Check database user against blacklist
201201
$dbuser_blacklist = array($conf['db_user'], 'mysql', 'root');
@@ -204,9 +204,9 @@ function onBeforeInsert() {
204204
}
205205

206206
/* restrict the names */
207-
/* crop user names if they are too long -> mysql: user: 16 chars / db: 64 chars */
207+
/* crop user names if they are too long -> mysql: user: 32 chars / db: 64 chars */
208208
if ($app->tform->errorMessage == ''){
209-
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16);
209+
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 32);
210210
}
211211

212212
$this->dataRecord['server_id'] = 0; // we need this on all servers

interface/web/sites/lib/lang/ar_database.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $wb['limit_database_txt'] = 'The max. number of databases is reached.';
2121
$wb['database_name_change_txt'] = 'The database name can not be changed';
2222
$wb['database_charset_change_txt'] = 'The database charset can not be changed';
2323
$wb['database_name_error_len'] = 'Database name - {db} - too long. The max. database name length incl. prefix is 64 chars.';
24-
$wb['database_user_error_len'] = 'Database username - {user}- too long. The max. database username length incl. prefix is 16 chars.';
24+
$wb['database_user_error_len'] = 'Database username - {user}- too long. The max. database username length incl. prefix is 32 chars.';
2525
$wb['parent_domain_id_txt'] = 'Site';
2626
$wb['database_site_error_empty'] = 'Select the site to which the database belongs.';
2727
$wb['select_site_txt'] = '- Select Site -';

interface/web/sites/lib/lang/ar_database_user.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $wb['active_txt'] = 'Active';
77
$wb['database_user_error_empty'] = 'Database user is empty.';
88
$wb['database_user_error_unique'] = 'There is already a database user with this name on the server. To get a unique name, e.g. prepend your domain name to the username.';
99
$wb['database_user_error_regex'] = 'Invalid database user name. The username may contain these characters: a-z, A-Z, 0-9 and the underscore. Length: 2 - 64 characters.';
10-
$wb['database_user_error_len'] = 'Database username - {user} - too long. The max. database username length incl. prefix is 16 chars.';
10+
$wb['database_user_error_len'] = 'Database username - {user} - too long. The max. database username length incl. prefix is 32 chars.';
1111
$wb['btn_save_txt'] = 'Save';
1212
$wb['btn_cancel_txt'] = 'Cancel';
1313
$wb['generate_password_txt'] = 'Generate Password';

interface/web/sites/lib/lang/bg_database.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $wb['database_charset_change_txt'] = 'Charset на базата данни не
2121
$wb['remote_ips_txt'] = 'Дистанционнен достъп IPs (разделени с , и празно за <i>всички</i>)';
2222
$wb['database_remote_error_ips'] = 'At least one of the entered ip addresses is invalid.';
2323
$wb['database_name_error_len'] = 'Името на базата данни - {db} - е твърде дълго. Максималната дължина трябва да бъде 64 символа включително и префикса';
24-
$wb['database_user_error_len'] = 'Потребителско име на базата данни- {user}- е твърде дълго. Максималната дължина трябва да е 16 символа включително префикса.';
24+
$wb['database_user_error_len'] = 'Потребителско име на базата данни- {user}- е твърде дълго. Максималната дължина трябва да е 32 символа включително префикса.';
2525
$wb['parent_domain_id_txt'] = 'Site';
2626
$wb['database_site_error_empty'] = 'Select the site to which the database belongs.';
2727
$wb['select_site_txt'] = '- Select Site -';

interface/web/sites/lib/lang/bg_database_user.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $wb['active_txt'] = 'Active';
77
$wb['database_user_error_empty'] = 'Database user is empty.';
88
$wb['database_user_error_unique'] = 'There is already a database user with this name on the server. To get a unique name, e.g. prepend your domain name to the username.';
99
$wb['database_user_error_regex'] = 'Invalid database user name. The username may contain these characters: a-z, A-Z, 0-9 and the underscore. Length: 2 - 64 characters.';
10-
$wb['database_user_error_len'] = 'Database username - {user} - too long. The max. database username length incl. prefix is 16 chars.';
10+
$wb['database_user_error_len'] = 'Database username - {user} - too long. The max. database username length incl. prefix is 32 chars.';
1111
$wb['btn_save_txt'] = 'Save';
1212
$wb['btn_cancel_txt'] = 'Cancel';
1313
$wb['generate_password_txt'] = 'Generate Password';

interface/web/sites/lib/lang/br_database.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $wb['database_name_change_txt'] = 'O nome do Banco de Dados não pode ser modifi
2727
$wb['database_user_missing_txt'] = 'Por favor, selecione um usuário para este banco de dados.';
2828
$wb['database_charset_change_txt'] = 'O charset do Banco de Dados não pode ser modificado.';
2929
$wb['database_name_error_len'] = 'Nome do Banco de Dados - {db} - muito longo. O comprimento do nome do Banco de Dados, incluindo o prefixo, são 64 caracteres.';
30-
$wb['database_user_error_len'] = 'Nome do usuário do Banco de Dados - {user} - muito longo. O comprimento do nome do usuário, incluindo o prefixo, são 16 caracteres.';
30+
$wb['database_user_error_len'] = 'Nome do usuário do Banco de Dados - {user} - muito longo. O comprimento do nome do usuário, incluindo o prefixo, são 32 caracteres.';
3131
$wb['parent_domain_id_txt'] = 'Site';
3232
$wb['database_site_error_empty'] = 'Selecione o site ao qual o banco de dados pertence.';
3333
$wb['select_site_txt'] = '-Selecionar Site-';

interface/web/sites/lib/lang/br_database_user.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $wb['active_txt'] = 'Ativo';
77
$wb['database_user_error_empty'] = 'Usuário do Banco de Dados está vazio.';
88
$wb['database_user_error_unique'] = 'Já existe este usuário no servidor. Para ter um nome exclusivo insira, por exemplo, um prefixo como o domínio antes do nome.';
99
$wb['database_user_error_regex'] = 'Nome do usuário do Banco de Dados inválido. O nome do usuário deve conter apenas os caracteres: a-z, A-Z, 0-9 e underscore. Comprimento: 2 - 64 caracteres.';
10-
$wb['database_user_error_len'] = 'Nome do usuário do Banco de Dados - {user} - muito longo. Comprimento permitido, incluindo o prefixo, não pode ultrapassar 16 caracteres.';
10+
$wb['database_user_error_len'] = 'Nome do usuário do Banco de Dados - {user} - muito longo. Comprimento permitido, incluindo o prefixo, não pode ultrapassar 32 caracteres.';
1111
$wb['btn_save_txt'] = 'Salvar';
1212
$wb['btn_cancel_txt'] = 'Cancelar';
1313
$wb['generate_password_txt'] = 'Gerar Senha';

interface/web/sites/lib/lang/ca_database.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $wb['limit_database_txt'] = 'Le nombre maximum de bases de données a été atte
2121
$wb['database_name_change_txt'] = 'Le nom de la base ne peut être modifié';
2222
$wb['database_charset_change_txt'] = 'Le charset de la base ne peut être modifié';
2323
$wb['database_name_error_len'] = 'Nom de base de données - {db} - trop long. La longueur maximale incluant le préfixe est de 64 caractères.';
24-
$wb['database_user_error_len'] = 'Nom d\'utilisateur de base de données - {user}- trop long. La longueur maximale incluant le préfixe est de 16 caractères.';
24+
$wb['database_user_error_len'] = 'Nom d\'utilisateur de base de données - {user}- trop long. La longueur maximale incluant le préfixe est de 32 caractères.';
2525
$wb['parent_domain_id_txt'] = 'Site';
2626
$wb['database_site_error_empty'] = 'Select the site to which the database belongs.';
2727
$wb['select_site_txt'] = '- Choisir un site -';

interface/web/sites/lib/lang/ca_database_user.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $wb['active_txt'] = 'Active';
77
$wb['database_user_error_empty'] = 'Utilisateur de base de données non rensigné.';
88
$wb['database_user_error_unique'] = 'There is already a database user with this name on the server. To get a unique name, e.g. prepend your domain name to the username.';
99
$wb['database_user_error_regex'] = 'Invalid database user name. The username may contain these characters: a-z, A-Z, 0-9 and the underscore. Length: 2 - 64 characters.';
10-
$wb['database_user_error_len'] = 'Database username - {user} - too long. The max. database username length incl. prefix is 16 chars.';
10+
$wb['database_user_error_len'] = 'Database username - {user} - too long. The max. database username length incl. prefix is 32 chars.';
1111
$wb['btn_save_txt'] = 'Sauvegarder';
1212
$wb['btn_cancel_txt'] = 'Annuler';
1313
$wb['generate_password_txt'] = 'Générer mot de passe';

0 commit comments

Comments
 (0)