Skip to content

Commit

Permalink
bbb: Add missing padding
Browse files Browse the repository at this point in the history
  • Loading branch information
lindhe committed Nov 25, 2024
1 parent 5cf6101 commit ccfe3a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions terminal/bbb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@ else
INPUT="${*}"
fi

# Add missing padding.
# This is commonly reqired when grabbing b64 strings from a JWT.
while [[ $(( ${#INPUT} % 4 )) -ne 0 ]]; do
INPUT+='='
done

echo -n "${INPUT}" | base64 -d ; echo

0 comments on commit ccfe3a2

Please sign in to comment.