aboutsummaryrefslogtreecommitdiff
path: root/t/lib-httpd
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-02 17:06:51 -0800
committerJunio C Hamano <gitster@pobox.com>2026-03-02 17:06:51 -0800
commit02c31a8ddc7a79a4e8f9dd0c437bcf3e73e60203 (patch)
treecc95ebd96337259c6eea7db849631754fee28e4f /t/lib-httpd
parent664bd4e15a99a477acb616337df0f9fa95c729c3 (diff)
parent5913fd26aad32bd028a8fe4e5b80fccc28e118af (diff)
downloadgit-02c31a8ddc7a79a4e8f9dd0c437bcf3e73e60203.tar.xz
Merge branch 'ag/http-netrc-tests'
Additional tests were introduced to see the interaction with netrc auth with auth failure on the http transport. * ag/http-netrc-tests: t5550: add netrc tests for http 401/403
Diffstat (limited to 't/lib-httpd')
-rw-r--r--t/lib-httpd/apache.conf4
-rw-r--r--t/lib-httpd/passwd1
2 files changed, 5 insertions, 0 deletions
diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
index e631ab0eb5..6b8c50a51a 100644
--- a/t/lib-httpd/apache.conf
+++ b/t/lib-httpd/apache.conf
@@ -238,6 +238,10 @@ SSLEngine On
AuthName "git-auth"
AuthUserFile passwd
Require valid-user
+
+ # return 403 for authenticated user: forbidden-user@host
+ RewriteCond "%{REMOTE_USER}" "^forbidden-user@host"
+ RewriteRule ^ - [F]
</Location>
<LocationMatch "^/auth-push/.*/git-receive-pack$">
diff --git a/t/lib-httpd/passwd b/t/lib-httpd/passwd
index d9c122f348..3bab7b6423 100644
--- a/t/lib-httpd/passwd
+++ b/t/lib-httpd/passwd
@@ -1 +1,2 @@
user@host:$apr1$LGPmCZWj$9vxEwj5Z5GzQLBMxp3mCx1
+forbidden-user@host:$apr1$LGPmCZWj$9vxEwj5Z5GzQLBMxp3mCx1