Commit 06356226 authored by Maarten den Braber's avatar Maarten den Braber
Browse files

Fix string truncation for POSIX

parent 70619dd0
......@@ -93,8 +93,7 @@ _transip_rest() {
}
_transip_get_token() {
nonce=$(echo "TRANSIP$(_time)" | _digest sha1 hex)
nonce=${nonce:0:32}
nonce=$(echo "TRANSIP$(_time)" | _digest sha1 hex | cut -c 1-32)
_debug nonce "$nonce"
data="{\"login\":\"${TRANSIP_Username}\",\"nonce\":\"${nonce}\",\"read_only\":\"${TRANSIP_Token_Read_Only}\",\"expiration_time\":\"${TRANSIP_Token_Expiration}\",\"label\":\"${TRANSIP_Token_Label}\",\"global_key\":\"${TRANSIP_Token_Global_Key}\"}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment