Skip to content

Commit 95436fe

Browse files
committed
Fixed update password where username has space
1 parent c7d3aa1 commit 95436fe

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

SOURCES/pzsvrtool

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ case "${1}" in
7474
;;
7575

7676
updateusrpw)
77-
if [[ "${@:3}" =~ ^[a-zA-Z0-9]+$ ]]; then
78-
exec /usr/libexec/pzsvrtool/pzsvrtool_main.sh updateusrpw ${2} ${3}
77+
if [[ "${3}" =~ ^[a-zA-Z0-9]+$ ]]; then
78+
exec /usr/libexec/pzsvrtool/pzsvrtool_main.sh updateusrpw "${2}" "${3}"
7979
else
8080
echo "[pzsvrtool] Invalid password, only allow alphanumeric with no space"
8181
fi

SOURCES/pzsvrtool_main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ updateusrpw() {
403403
fi
404404
check_config
405405
if [[ $(sql_query ~/"${zomboidServerFolderName}/db/${zomboidServerName}.db" "SELECT id FROM whitelist WHERE username = '${1}';") ]]; then
406-
python3 /usr/libexec/pzsvrtool/pzsvrtool_updateusrpw.py -username ${1} -password ${2}
406+
python3 /usr/libexec/pzsvrtool/pzsvrtool_updateusrpw.py -username "${1}" -password "${2}"
407407
echo "[pzsvrtool] Password changed for ${1} "
408408
else
409409
echo "[pzsvrtool] ${1} not found"

control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: pzsvrtool
2-
Version: 1.6.23
2+
Version: 1.6.24
33
Section: utils
44
Priority: optional
55
Architecture: all

pzsvrtool.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name: pzsvrtool
2-
Version: 1.6.23
2+
Version: 1.6.24
33
Release: 1%{?dist}
44
Summary: Scripts to manage Project Zomboid Server
55

0 commit comments

Comments
 (0)