diff options
author | Jan Pazdziora <jpazdziora@redhat.com> | 2022-01-23 11:18:56 +0100 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2022-01-30 12:08:23 +0100 |
commit | 4a3677859d48b8bf693ef71f4084be9ec8709e7b (patch) | |
tree | 5a6a0f3cfbeaff188cd494bb1bb48ccb0bf9cfca | |
parent | cda71908dbb680b3f34fe7290d3351873416a8ae (diff) | |
download | mod_intercept_form_submit-4a3677859d48b8bf693ef71f4084be9ec8709e7b.tar.gz mod_intercept_form_submit-4a3677859d48b8bf693ef71f4084be9ec8709e7b.tar.xz mod_intercept_form_submit-4a3677859d48b8bf693ef71f4084be9ec8709e7b.zip |
Add test for AuthPAMExpiredRedirect behaviour.
-rw-r--r-- | tests/auth.conf | 9 | ||||
-rwxr-xr-x | tests/run.sh | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/auth.conf b/tests/auth.conf index 914d4a5..9ed883d 100644 --- a/tests/auth.conf +++ b/tests/auth.conf @@ -15,3 +15,12 @@ ScriptAlias /auth1r /var/www/cgi-bin/auth.cgi InterceptFormPassword password InterceptFormPasswordRedact on </LocationMatch> + +ScriptAlias /auth1s /var/www/cgi-bin/auth.cgi +<LocationMatch ^/auth1s> + InterceptFormPAMService webl + InterceptFormLogin login + InterceptFormPassword password + InterceptFormPasswordRedact on + AuthPAMExpiredRedirect http://localhost/login?backurl=%s&uid=%u +</LocationMatch> diff --git a/tests/run.sh b/tests/run.sh index ef7d240..5360791 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -20,4 +20,10 @@ curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si curl --data 'login=user1&password=heslo1' -si http://localhost/auth1r | 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/auth1r | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'something=somewhere&password=[REDACTED]&something=else&login=user1' | wc -l | grep -q 2 +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 + echo OK $0. |