From cbe5837f6cbbe8c5c86eadb19b288d72e7107c76 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 10 Dec 2019 11:22:59 +0100 Subject: [PATCH] Bug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly CGI->url_param does not always return the parameters in the same order. Test plan: 0/ Recreate the random failure, does not apply the patch and run t/Auth_with_shibboleth.t several times. You will notice that it fails inconsistenly 1/ Apply the patch and confirm that it now passes 100% of the time Signed-off-by: Martin Renvoize (cherry picked from commit b022b37db75e468cc56f3189b2f284f03e81ca2d) (cherry picked from commit 62875f2b40c2608ddc2447d2a72f89d225b7c88c) --- C4/Auth_with_shibboleth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm index 94190b20b3..a7f24b2ab2 100644 --- a/C4/Auth_with_shibboleth.pm +++ b/C4/Auth_with_shibboleth.pm @@ -194,7 +194,7 @@ sub _get_return { my $uri_base_part = _get_uri() . get_script_name(); my $uri_params_part = ''; - foreach my $param ( $query->url_param() ) { + foreach my $param ( sort $query->url_param() ) { # url_param() always returns parameters that were deleted by delete() # This additional check ensure that parameter was not deleted. my $uriPiece = $query->param($param); -- 2.39.5