From a3f9ccd4eca027f04e7c6393a603261b7f457c53 Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 24 Jun 2024 17:11:16 +0200 Subject: [PATCH 1/2] fix Yunohost Portal detection on bookworm --- lib/tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tests.sh b/lib/tests.sh index 3b2b671..75ffacc 100644 --- a/lib/tests.sh +++ b/lib/tests.sh @@ -318,7 +318,8 @@ _VALIDATE_THAT_APP_CAN_BE_ACCESSED () { local page_extract=$(lynx -dump -force_html "$curl_output" | head --lines 20 | tee -a "$full_log") # Check if the page title is neither the YunoHost portail or default NGINX page - if [ "$page_title" = "YunoHost Portal" ] + # And check if the "Real URL" is the ynh sso + if [ "$page_title" = "YunoHost Portal" ] || cat $TEST_CONTEXT/curl_print | cut --delimiter=';' --fields=2 | grep -q "/yunohost/sso" then log_debug "The connection attempt fall on the YunoHost portal." fell_on_sso_portal=1 From dd9242881949612b000ff8adf658b329438e9e7d Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 24 Jun 2024 17:17:08 +0200 Subject: [PATCH 2/2] Update lib/tests.sh Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> --- lib/tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tests.sh b/lib/tests.sh index 75ffacc..1e22bf5 100644 --- a/lib/tests.sh +++ b/lib/tests.sh @@ -319,7 +319,7 @@ _VALIDATE_THAT_APP_CAN_BE_ACCESSED () { # Check if the page title is neither the YunoHost portail or default NGINX page # And check if the "Real URL" is the ynh sso - if [ "$page_title" = "YunoHost Portal" ] || cat $TEST_CONTEXT/curl_print | cut --delimiter=';' --fields=2 | grep -q "/yunohost/sso" + if [ "$page_title" = "YunoHost Portal" ] || (cat $TEST_CONTEXT/curl_print | cut --delimiter=';' --fields=2 | grep -q "/yunohost/sso") then log_debug "The connection attempt fall on the YunoHost portal." fell_on_sso_portal=1