added auth improvements and luci

This commit is contained in:
Russel Yasol
2024-10-03 05:48:00 +08:00
parent 661a3c3f44
commit 7d36748dce
16 changed files with 3059 additions and 2270 deletions

View File

@@ -15,7 +15,7 @@ INPUT_PASSWORD=$(echo "$POST_DATA" | sed -n 's/^.*password=\([^&]*\).*$/\1/p')
INPUT_PASSWORD=$(echo "$INPUT_PASSWORD" | sed 's/+/ /g;s/%\(..\)/\\x\1/g' | xargs -0 printf "%b")
# Log received password for debugging (remove in production)
echo "Received password: $INPUT_PASSWORD" >&2
# echo "Received password: $INPUT_PASSWORD" >&2
# Extract the hashed password from /etc/shadow for the specified user
USER_SHADOW_ENTRY=$(grep "^$USER:" /etc/shadow)