Replies: 5 comments 2 replies
-
If you want to script it just set the password by generating the login fields in the config. |
Beta Was this translation helpful? Give feedback.
-
thanks will check for this solution, may be source will be fixed in 4.6.2 |
Beta Was this translation helpful? Give feedback.
-
Some proof of concept ways of generating the password hash: #!/bin/bash
# Check if a password is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <password>"
exit 1
fi
# Parameters
PLAIN_PASSWD="$1"
ITERATIONS=100000
SALT_SIZE=16
KEY_LEN=64 # Length of the hash output in bytes (512 bits for SHA-512)
# Generate a random salt
SALT=$(openssl rand -hex $SALT_SIZE)
# Use OpenSSL KDF command for PBKDF2 hashing
HASH=$(openssl kdf -keylen $KEY_LEN -kdfopt digest:SHA512 -kdfopt pass:"$PLAIN_PASSWD" \
-kdfopt salt:"$SALT" -kdfopt iter:$ITERATIONS PBKDF2 | tr -d '\n')
# Encode the salt and hash in Base64
SALT_BASE64=$(echo -n "$SALT" | xxd -r -p | base64 | tr -d '\n')
HASH_BASE64=$(echo -n "$HASH" | xxd -r -p | base64 | tr -d '\n')
# Output the formatted result
echo "@ByteArray(${SALT_BASE64}:${HASH_BASE64})" Or with a light binary such as my placeholder repo here https://github.com/saltydk/qbt_pw_gen |
Beta Was this translation helpful? Give feedback.
-
If they patch it I can apply the patch and build a revision or they might drop a new version at the same time specifically for this fix. Otherwise this is something that can be scripted around for deployment and is not something I would try to address here. Backporting some patches is something I consider acceptable but I'm not deploying containers or anything here, just the binary. @saltydk has provided a sensible approach to handling this deployment issue, thanks for that. |
Beta Was this translation helpful? Give feedback.
-
I created a revision with these backports qbittorrent/qBittorrent#19979 so the current build of 4.6.1 is fixed. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am using your releases for Qnap NAS package since years now, and porpose it as QPKG to community
latest version has breaking change with password parsing in stdout (when scripted)
maybe you are already aware
qbittorrent/qBittorrent#19984
Beta Was this translation helpful? Give feedback.
All reactions