From 3776c0f27bd4915d54a71167dcda8c8ca9da28ea Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Wed, 29 Jul 2026 20:39:36 +0200 Subject: [PATCH] Adds a trimmed-length check to the PI_MAIN_PASSWORD debug step Username is now confirmed correct (14 chars, exact match). This checks whether the password secret carries leading/trailing whitespace or a stray newline picked up when it was pasted into Gitea - the length differs from the trimmed length if so, without ever logging the password's actual characters. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_015FffvxxJp5wG34Ru48GBig --- .gitea/workflows/deploy-scp.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/deploy-scp.yaml b/.gitea/workflows/deploy-scp.yaml index a445419..8b168db 100644 --- a/.gitea/workflows/deploy-scp.yaml +++ b/.gitea/workflows/deploy-scp.yaml @@ -51,6 +51,8 @@ jobs: echo "PI_MAIN_USERNAME length: ${#PI_MAIN_USERNAME}" echo "PI_MAIN_USERNAME equals 'gitea-workflow': $([ "$PI_MAIN_USERNAME" = "gitea-workflow" ] && echo yes || echo no)" echo "PI_MAIN_PASSWORD length: ${#PI_MAIN_PASSWORD}" + PW_TRIMMED="$(printf '%s' "$PI_MAIN_PASSWORD" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + echo "PI_MAIN_PASSWORD trimmed length: ${#PW_TRIMMED}" env: PI_MAIN_USERNAME: ${{ secrets.PI_MAIN_USERNAME }} PI_MAIN_PASSWORD: ${{ secrets.PI_MAIN_PASSWORD }}