fix: invidious password
This commit is contained in:
parent
b57342f53e
commit
63dad8c626
3 changed files with 39 additions and 35 deletions
|
|
@ -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())")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue