From 834ea81f2d831ef1e933db42714e913df46c0a73 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 28 Feb 2024 14:36:17 +0000 Subject: [PATCH] Update docker/auth-bench/run-ab.sh --- docker/auth-bench/run-ab.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docker/auth-bench/run-ab.sh b/docker/auth-bench/run-ab.sh index 22e1c6b..3e3a1d6 100644 --- a/docker/auth-bench/run-ab.sh +++ b/docker/auth-bench/run-ab.sh @@ -9,12 +9,18 @@ function fetch_auth_cookie { local login_url="https://bishopairport.org/login/concrete/authenticate" local login_data="uName=$USERNAME&uPassword=$PASSWORD" - # Fetch and store the cookie for Concrete5 - curl -c "$cookie_file" -d "$login_data" -X POST "$login_url" + # Fetch and store the cookie for Concrete5, with verbose output for debugging + curl -c "$cookie_file" -d "$login_data" -X POST "$login_url" -v > /tmp/curl_response_concrete5.txt 2>&1 + + # Check if the cookie was successfully fetched + if [ ! -s "$cookie_file" ]; then + echo "Failed to fetch cookie for Concrete5. Check /tmp/curl_response_concrete5.txt for details." + exit 1 + fi ;; "WordPress") - # Placeholder for WordPress authentication + # Placeholder for WordPress authentication, to be developed echo "WordPress authentication: To be developed" ;; @@ -25,6 +31,7 @@ function fetch_auth_cookie { } + function prepare_log_file { local log_file="/logs/authenticated.csv" > "$log_file"