Skip to content

Commit ccfe3a2

Browse files
committed
bbb: Add missing padding
1 parent 5cf6101 commit ccfe3a2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

terminal/bbb.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,10 @@ else
3434
INPUT="${*}"
3535
fi
3636

37+
# Add missing padding.
38+
# This is commonly reqired when grabbing b64 strings from a JWT.
39+
while [[ $(( ${#INPUT} % 4 )) -ne 0 ]]; do
40+
INPUT+='='
41+
done
42+
3743
echo -n "${INPUT}" | base64 -d ; echo

0 commit comments

Comments
 (0)