fix: invidious password
This commit is contained in:
@@ -36,8 +36,11 @@ in
|
||||
if [ "$USER_EXISTS" -eq "0" ]; then
|
||||
echo "Creating admin user..."
|
||||
|
||||
# Read password from credential
|
||||
PASSWORD=$(cat $CREDENTIALS_DIRECTORY/admin_password)
|
||||
# Read password from credential and trim whitespace
|
||||
PASSWORD=$(cat $CREDENTIALS_DIRECTORY/admin_password | tr -d '\n\r')
|
||||
|
||||
# Truncate to 55 characters (Invidious password limit)
|
||||
PASSWORD="''${PASSWORD:0:55}"
|
||||
|
||||
# Generate bcrypt hash
|
||||
HASH=$(${pythonWithBcrypt}/bin/python3 -c "import bcrypt; import sys; print(bcrypt.hashpw('$PASSWORD'.encode(), bcrypt.gensalt(rounds=10)).decode())")
|
||||
|
||||
Reference in New Issue
Block a user