mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
More informative error for long MySQL username
We talked about it at https://github.com/serghey-rodin/vesta/issues/860 issue
This commit is contained in:
parent
785d5dd261
commit
654838bfc8
1 changed files with 4 additions and 1 deletions
|
@ -583,7 +583,10 @@ is_date_format_valid() {
|
||||||
# Database user validator
|
# Database user validator
|
||||||
is_dbuser_format_valid() {
|
is_dbuser_format_valid() {
|
||||||
exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]"
|
exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|/|\|\"|'|;|%|\`| ]"
|
||||||
if [[ "$1" =~ $exclude ]] || [ 17 -le ${#1} ]; then
|
if [ 17 -le ${#1} ]; then
|
||||||
|
check_result $E_INVALID "mysql username can be up to 16 characters long"
|
||||||
|
fi
|
||||||
|
if [[ "$1" =~ $exclude ]]; then
|
||||||
check_result $E_INVALID "invalid $2 format :: $1"
|
check_result $E_INVALID "invalid $2 format :: $1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue