diff --git a/padd.sh b/padd.sh index 8917714..8e28ab5 100755 --- a/padd.sh +++ b/padd.sh @@ -274,7 +274,13 @@ DeleteSession() { # SID is not null (successful authenthication only), delete the session if [ "${validSession}" = true ] && [ "${SID}" != null ]; then # Try to delete the session. Omit the output, but get the http status code - deleteResponse=$(curl --connect-timeout 2 -skS -o /dev/null -w "%{http_code}" -X DELETE "${API_URL}auth" -H "Accept: application/json" -H "sid: ${SID}") + # SID is passed via stdin config (-K -) to prevent leakage via process information + deleteResponse=$(curl --connect-timeout 2 -skS -o /dev/null -w "%{http_code}" -X DELETE "${API_URL}auth" \ + -H "Accept: application/json" \ + -K - <>%{http_code}" -X GET "${API_URL}$1$2" -H "Accept: application/json" -H "sid: ${SID}" ) + # SID is passed via stdin config (-K -) to prevent leakage via process information + response=$(curl --connect-timeout 2 -sk -w ">>%{http_code}" -X GET "${API_URL}$1$2" \ + -H "Accept: application/json" \ + -K - <> delim