From 7293276d344fa562b969d956c93f94be908323b9 Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Thu, 17 Feb 2022 12:21:06 +0100 Subject: In mod_authnz_pam 1.2.3, the default redirect status was changed from 307 to 303. So the actual result we get in tests depends on the mod_authnz_pam version in given distribution. --- tests/run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run.sh b/tests/run.sh index cb08378..593d8ac 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -36,9 +36,9 @@ curl --data 'login=bob&password=Ne Bobovo heslo' -si http://localhost/auth1r | t curl --data 'login=user1&password=heslo1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'login=user1&password=[REDACTED]' | wc -l | grep -q 2 curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'something=somewhere&password=[REDACTED]&something=else&login=user1' | wc -l | grep -q 2 chage -d $(date -d -2days +%Y-%m-%d) -M 1 user1 -curl --data 'login=user1&password=heslo1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 307 Temporary Redirect' -e 'Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=user1' | wc -l | grep -q 2 -curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 307 Temporary Redirect' -e 'Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=user1' | wc -l | grep -q 2 +curl --data 'login=user1&password=heslo1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 303 See Other' -e 'HTTP/1.1 307 Temporary Redirect' -e 'Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=user1' | wc -l | grep -q 2 +curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 303 See Other' -e 'HTTP/1.1 307 Temporary Redirect' -e 'Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=user1' | wc -l | grep -q 2 chage -d $(date -d -2days +%Y-%m-%d) -M 1 "$NAME" -curl --data "something=somewhere&password=myši+%26%20zaj%C3%adci&something=else&login=$NAME" -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 307 Temporary Redirect' -e "Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=$XNAME" | wc -l | grep -q 2 +curl --data "something=somewhere&password=myši+%26%20zaj%C3%adci&something=else&login=$NAME" -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 303 See Other' -e 'HTTP/1.1 307 Temporary Redirect' -e "Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=$XNAME" | wc -l | grep -q 2 echo OK $0. -- cgit