pull: Cleanly error out on unknown schemes

Previous to this we'd trip an assertion `abort()` deep in the curl code if e.g.
a user did `ostree remote add foo htttp://...` etc.

Motivated by considering supporting "external remotes" where code outside
ostree does a pull, but we want to reuse the signing verification infrastructure.
This commit is contained in:
Colin Walters committed 2021-04-27 13:11:18 -04:00
1 parent 0fcf4a3f30
commit 0f3bccf640
4 files changed
+34 -2

No files matched your search

+3
View File
@@ -3446,6 +3446,9 @@ compute_effective_mirrorlist (OstreeRepo *self,
if (!baseuri)
return FALSE;
if (!_ostree_fetcher_uri_validate (baseuri, error))
return FALSE;
*out_mirrorlist =
g_ptr_array_new_with_free_func ((GDestroyNotify) _ostree_fetcher_uri_free);
g_ptr_array_add (*out_mirrorlist, g_steal_pointer (&baseuri));