Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Hestia allows umlauts for user names, which produces some issues. #3213

Closed
ScIT-Raphael opened this issue Jan 19, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@ScIT-Raphael
Copy link
Member

Describe the bug

root@webxx:/backup# v-backup-user xxx
/usr/local/hestia/bin/v-backup-user: line 178: Error: Invalid key value format [U_SYS_USERS=$'xxxx,XXX-XXX,B\303\244ren-XXX,ith'] * 2: syntax error in expression (error token is ": Invalid key value format [U_SYS_USERS=$'xxxx,XXX-XXX,B\303\244ren-XXX,ith''] * 2")

Tell us how to replicate the bug

Add a user with umlauts (for example ä ü ö).

Which components are affected by this bug?

Control Panel Command Line Interface

Hestia Control Panel Version

1.7.0~alpha

Operating system

Ubuntu 22.04 LTS

Log capture

No response

@ScIT-Raphael ScIT-Raphael added the bug Something isn't working label Jan 19, 2023
@jaapmarcus
Copy link
Member

jaapmarcus commented Jan 19, 2023

root@dev:# v-add-user "tetäesfawea" afwe me@xxxx
root@dev:# v-add-user "äesfawea" afwe me@xxxx

Both work :|

https://github.com/hestiacp/hestiacp/blob/main/func/main.sh#L1566-L1570

@jaapmarcus
Copy link
Member

jaapmarcus commented Jan 22, 2023

It is using:

hestiacp/func/main.sh

Lines 680 to 691 in bce434f

# User format validator
is_user_format_valid() {
if [ ${#1} -eq 1 ]; then
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
check_result "$E_INVALID" "invalid $2 format :: $1"
fi
else
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]; then
check_result "$E_INVALID" "invalid $2 format :: $1"
fi
fi
}

jaapmarcus added a commit to jaapmarcus/hestiacp that referenced this issue Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants