riot: loosen username check as sometimes it's not a unix username

This commit is contained in:
xiongdian.me 2023-06-29 15:42:58 +08:00
parent fdc12393d9
commit e8d3db4fbb

View File

@ -33,7 +33,7 @@ get_server_meta() {
if [[ "$remote" == *@* ]]; then if [[ "$remote" == *@* ]]; then
RET_USERNAME=${remote%%@*} RET_USERNAME=${remote%%@*}
remote=${remote#*@} remote=${remote#*@}
check_username $RET_USERNAME || fmt_fatal invalid username \"$RET_USERNAME\" check_username $RET_USERNAME || fmt_warning \"$RET_USERNAME\" is not a valid unix username
fi fi
# if in the form ...:22 # if in the form ...:22
if [[ "$remote" == "["*"]":* || ( "$remote" != "["*"]" && "$remote" == *:* ) ]]; then if [[ "$remote" == "["*"]":* || ( "$remote" != "["*"]" && "$remote" == *:* ) ]]; then