Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/mysql_databases/code/controller.ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static function ExecuteDeleteDatabase($my_id_pk)

static function IsValidUserName($username)
{
if (!preg_match('/^[a-z\d][a-z\d-]{0,62}$/i', $username) || preg_match('/-$/', $username)) {
if (!preg_match('/^[a-z\d][a-z\d-\_]{0,62}$/i', $username) || preg_match('/-$/', $username)) {
return false;
}
return true;
Expand Down
4 changes: 2 additions & 2 deletions modules/mysql_users/code/controller.ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static function CheckPasswordForErrors($password)

static function IsValidUserName($username)
{
if (!preg_match('/^[a-z\d][a-z\d-]{0,62}$/i', $username) || preg_match('/-$/', $username)) {
if (!preg_match('/^[a-z\d][a-z\d-\_]{0,62}$/i', $username) || preg_match('/-$/', $username)) {
return false;
} else {
if (strlen($username) < 17) {
Expand All @@ -527,7 +527,7 @@ static function IsValidUserName($username)

static function IsValidPassword($password)
{
if (!ctype_alnum($password)) {
if (!preg_match('/^[a-zA-Z0-9\*\&\.\-\_\?\!\%]+$/',$password)) {
return false;
}
return true;
Expand Down