Skip to content

Commit

Permalink
fix: prepend header payload to generated signature
Browse files Browse the repository at this point in the history
  • Loading branch information
botanical committed Jan 15, 2025
1 parent f1526b2 commit 58dc10f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,13 @@ jobs:
JWT_HEADER_PAYLOAD="${BASE64_HEADER}.${BASE64_PAYLOAD}"
echo "Header.Payload: $JWT_HEADER_PAYLOAD"
JWT=$(printf '%s' "$JWT_HEADER_PAYLOAD" | openssl dgst -sha256 -sign app.pem | openssl base64 -A | tr -d '=' | tr '/+' '_-')
JWT_SIGNATURE=$(printf '%s' "$JWT_HEADER_PAYLOAD" | openssl dgst -sha256 -sign app.pem | openssl base64 -A | tr -d '=' | tr '/+' '_-')
# Debug: Check if JWT was created
if [ -z "$JWT" ]; then
echo "Error: Failed to create JWT!"
exit 1
fi
JWT="$JWT_HEADER_PAYLOAD.$JWT_SIGNATURE"
echo "::add-mask::$JWT"
Expand Down

0 comments on commit 58dc10f

Please sign in to comment.