test/auth: add checks for urldecode_username

This commit is contained in:
Peter Bieringer
2026-04-25 06:47:08 +02:00
parent 07ace3412c
commit e06a35dec9

View File

@@ -385,6 +385,16 @@ class TestBaseAuthRequests(BaseTest):
self._test_htpasswd("plain", "tmp:bepo", ( self._test_htpasswd("plain", "tmp:bepo", (
("tmp", "bepo", True), ("tmp@domain.example", "bepo", True), ("tmp1", "bepo", False))) ("tmp", "bepo", True), ("tmp@domain.example", "bepo", True), ("tmp1", "bepo", False)))
def test_htpasswd_email_encoding_url_true(self) -> None:
self.configure({"auth": {"urldecode_username": "True"}})
self._test_htpasswd("plain", "tmp@domain.example:bepo", (
("tmp", "bepo", False), ("tmp%40domain.example", "bepo", True), ("tmp@domain.example", "bepo", True)))
def test_htpasswd_email_encoding_url_false(self) -> None:
self.configure({"auth": {"urldecode_username": "False"}})
self._test_htpasswd("plain", "tmp@domain.example:bepo", (
("tmp", "bepo", False), ("tmp%40domain.example", "bepo", False), ("tmp@domain.example", "bepo", True)))
def test_remote_user(self) -> None: def test_remote_user(self) -> None:
self.configure({"auth": {"type": "remote_user"}}) self.configure({"auth": {"type": "remote_user"}})
_, responses = self.propfind("/", """\ _, responses = self.propfind("/", """\