[libvirt] [PATCH 05/14] tests: viruri: Add test for password in URI userinfo

Peter Krempa posted 14 patches 6 years, 5 months ago
[libvirt] [PATCH 05/14] tests: viruri: Add test for password in URI userinfo
Posted by Peter Krempa 6 years, 5 months ago
While it's a bad idea to use userinfo to pass credentials via an URI add
a test that we at least do the correct thing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 tests/viruritest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/viruritest.c b/tests/viruritest.c
index d419711135..3255e2333a 100644
--- a/tests/viruritest.c
+++ b/tests/viruritest.c
@@ -171,6 +171,7 @@ mymain(void)

     TEST_PARSE("test://example.com", "test", "example.com", 0, NULL, NULL, NULL, NULL, NULL);
     TEST_PARSE("test://foo@example.com", "test", "example.com", 0, NULL, NULL, NULL, "foo", NULL);
+    TEST_PARSE("test://foo:pass@example.com", "test", "example.com", 0, NULL, NULL, NULL, "foo:pass", NULL);
     TEST_PARSE("test://example.com:123", "test", "example.com", 123, NULL, NULL, NULL, NULL, NULL);
     TEST_PARSE("test://example.com:123/system?name=value#foo", "test", "example.com", 123, "/system", "name=value", "foo", NULL, params);
     TEST_PARSE("test://127.0.0.1:123/system", "test", "127.0.0.1", 123, "/system", NULL, NULL, NULL, NULL);
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 05/14] tests: viruri: Add test for password in URI userinfo
Posted by Ján Tomko 6 years, 5 months ago
On Fri, Aug 16, 2019 at 12:39:26PM +0200, Peter Krempa wrote:
>While it's a bad idea to use userinfo to pass credentials via an URI add

s/an URI/a URI/

>a test that we at least do the correct thing.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> tests/viruritest.c | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list