From 389c1e1be78ca3290689948d4a3b449c07c048bf Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Fri, 21 Jan 2022 22:49:45 +0100 Subject: Test the expansion of placeholders as well. --- tests/auth.conf | 2 +- tests/run.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auth.conf b/tests/auth.conf index 1e41de9..2ee519e 100644 --- a/tests/auth.conf +++ b/tests/auth.conf @@ -51,6 +51,6 @@ ScriptAlias /authnp4 /var/www/cgi-bin/auth.cgi AuthName "private area" AuthBasicProvider PAM AuthPAMService webl - AuthPAMExpiredRedirect http://localhost/fix-password + AuthPAMExpiredRedirect http://localhost/fix-password?return=%s&percent=%%&user=%u Require pam-account webl diff --git a/tests/run.sh b/tests/run.sh index ed51b6f..2d8019d 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -55,7 +55,7 @@ curl -u user1:heslo1 -s http://localhost/authnp3 | tee /dev/stderr | grep 'User curl -u user1:heslo1 -s http://localhost/authnp4 | tee /dev/stderr | grep 'User user1' chage -d $(date -d -2days +%Y-%m-%d) -M 1 user1 curl -u user1:heslo1 -s http://localhost/authnp3 | tee /dev/stderr | grep 401 -curl -i -u user1:heslo1 -s http://localhost/authnp4 | tee /dev/stderr | grep 'Location: http://localhost/fix-password' +curl -i -u user1:heslo1 -s 'http://localhost/authnp4?id=123&data=M%26M' | tee /dev/stderr | grep -F 'Location: http://localhost/fix-password?return=http%3a%2f%2flocalhost%2fauthnp4%3fid%3d123%26data%3dM%2526M&percent=%25&user=user1' chage -d $(date -d -2days +%Y-%m-%d) -M 3 user1 curl -u user1:heslo1 -s http://localhost/authnp3 | tee /dev/stderr | grep 'User user1' curl -u user1:heslo1 -s http://localhost/authnp4 | tee /dev/stderr | grep 'User user1' -- cgit