We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61ada0b commit 7ae7673Copy full SHA for 7ae7673
root/etc/cont-init.d/30-config
@@ -5,7 +5,7 @@ if grep -q 'REPLACEWITHFERNETKEY' /app/ldap-backend-app.py; then
5
if [ -z "${FERNETKEY}" ]; then
6
KEY=$(python3 /app/fernet-key.py)
7
echo "generated fernet key"
8
- elif [ $(openssl base64 -d <<< "${FERNETKEY}" | wc -c) != "32" ]; then
+ elif ! python3 -c "from cryptography.fernet import Fernet; Fernet(b'${FERNETKEY}').encrypt(b\"my deep dark secret\")" 2>/dev/null; then
9
echo "FERNETKEY env var is not set to a base64 encoded 32-byte key"
10
11
0 commit comments