From b18e9f68d51eae728697825a6b460470fa687ec1 Mon Sep 17 00:00:00 2001 From: svrnm Date: Thu, 7 Apr 2022 10:49:17 +0200 Subject: [PATCH] Fix authentication bug. --- act.sh | 4 ++-- auth?action=login | 0 commands/controller/login.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 auth?action=login diff --git a/act.sh b/act.sh index 093a044..a785651 100755 --- a/act.sh +++ b/act.sh @@ -1,6 +1,6 @@ #!/bin/bash ACT_VERSION="v21.4.0" -ACT_LAST_COMMIT="9b200d473e5c26fa65f6aa112a34c648a3dc0645" +ACT_LAST_COMMIT="efc9c1266341f1ef62e684b41c3021693b73146a" USER_CONFIG="$HOME/.appdynamics/act/config.sh" GLOBAL_CONFIG="/etc/appdynamics/act/config.sh" CONFIG_CONTROLLER_COOKIE_LOCATION="/tmp/appdynamics-controller-cookie.txt" @@ -681,7 +681,7 @@ EOF CONTROLLER_LOGIN_STATUS=0 controller_login() { debug "Login at ${CONFIG_CONTROLLER_HOST} with ${CONFIG_CONTROLLER_CREDENTIALS}" - LOGIN_RESPONSE=$(httpClient -sI -c "${CONFIG_CONTROLLER_COOKIE_LOCATION}" --user "${CONFIG_CONTROLLER_CREDENTIALS}" "${CONFIG_CONTROLLER_HOST}/controller/auth?action=login") + LOGIN_RESPONSE=$(httpClient -v -c "${CONFIG_CONTROLLER_COOKIE_LOCATION}" --user "${CONFIG_CONTROLLER_CREDENTIALS}" "${CONFIG_CONTROLLER_HOST}/controller/auth?action=login" 2>&1) debug "RESPONSE: ${LOGIN_RESPONSE}" # The section option is for supporting HTTP2 (#12) if [[ "${LOGIN_RESPONSE/200 OK}" != "${LOGIN_RESPONSE}" ]] || [[ "${LOGIN_RESPONSE/HTTP\/2 200}" != "${LOGIN_RESPONSE}" ]]; then diff --git a/auth?action=login b/auth?action=login new file mode 100644 index 0000000..e69de29 diff --git a/commands/controller/login.sh b/commands/controller/login.sh index 213c2c8..6b15def 100644 --- a/commands/controller/login.sh +++ b/commands/controller/login.sh @@ -4,7 +4,7 @@ CONTROLLER_LOGIN_STATUS=0 controller_login() { debug "Login at ${CONFIG_CONTROLLER_HOST} with ${CONFIG_CONTROLLER_CREDENTIALS}" - LOGIN_RESPONSE=$(httpClient -sI -c "${CONFIG_CONTROLLER_COOKIE_LOCATION}" --user "${CONFIG_CONTROLLER_CREDENTIALS}" "${CONFIG_CONTROLLER_HOST}/controller/auth?action=login") + LOGIN_RESPONSE=$(httpClient -v -c "${CONFIG_CONTROLLER_COOKIE_LOCATION}" --user "${CONFIG_CONTROLLER_CREDENTIALS}" "${CONFIG_CONTROLLER_HOST}/controller/auth?action=login" 2>&1) debug "RESPONSE: ${LOGIN_RESPONSE}" # The section option is for supporting HTTP2 (#12) if [[ "${LOGIN_RESPONSE/200 OK}" != "${LOGIN_RESPONSE}" ]] || [[ "${LOGIN_RESPONSE/HTTP\/2 200}" != "${LOGIN_RESPONSE}" ]]; then