Tue, 09 Apr 2024 21:43:36 +0200
fix dav repo-url command containing the password base64 encoded
dav/main.c | file | annotate | diff | comparison | revisions |
--- a/dav/main.c Tue Apr 09 21:28:24 2024 +0200 +++ b/dav/main.c Tue Apr 09 21:43:36 2024 +0200 @@ -2536,14 +2536,16 @@ } printf("%.*s", (int)repo->user.value.length, repo->user.value.ptr); if(repo->password.value.ptr) { + cxmutstr pw_decoded = dav_repository_get_decodedpassword(repo); CURL *curl = curl_easy_init(); char *pw = curl_easy_escape( curl, - repo->password.value.ptr, - repo->password.value.length); + pw_decoded.ptr, + pw_decoded.length); printf(":%s", pw); curl_free(pw); curl_easy_cleanup(curl); + free(pw_decoded.ptr); } putchar('@'); printf("%.*s", (int)url.length-hostindex, url.ptr+hostindex);