Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
yuarel: password is not mandatory in url parsing
Baptiste Daroussin committed 2 years ago
commit 34b7009af828be6ae97c679b55e565673a851156
parent 862251c
1 file changed +3 -5
modified libpkg/yuarel.c
@@ -180,12 +180,10 @@ yuarel_parse(struct yuarel *url, char *u)
			*u = '\0';

			u = strchr(url->username, ':');
-
			if (NULL == u) {
-
				return -1;
+
			if (NULL != u) {
+
				url->password = u + 1;
+
				*u = '\0';
			}
-

-
			url->password = u + 1;
-
			*u = '\0';
		}

		/* Missing hostname? */