summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pazdziora <jpazdziora@redhat.com>2022-01-21 22:49:45 +0100
committerJan Pazdziora <jpazdziora@redhat.com>2022-01-21 22:49:45 +0100
commit389c1e1be78ca3290689948d4a3b449c07c048bf (patch)
treea394dd57c91be58d4b123ac2468646cf0e7cd27c
parent7b12978039208e4c59c294baeee877b4d122d747 (diff)
downloadmod_authnz_pam-389c1e1be78ca3290689948d4a3b449c07c048bf.tar.gz
mod_authnz_pam-389c1e1be78ca3290689948d4a3b449c07c048bf.tar.xz
mod_authnz_pam-389c1e1be78ca3290689948d4a3b449c07c048bf.zip
Test the expansion of placeholders as well.
-rw-r--r--tests/auth.conf2
-rwxr-xr-xtests/run.sh2
2 files changed, 2 insertions, 2 deletions
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
</LocationMatch>
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'