From 9bbbeaab56d8c3820bc5a48547562d168ab9b9a3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 8 May 2017 20:17:57 +0300 Subject: Fix repository certificate path matching --- bpkg/auth.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bpkg/auth.cxx') diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx index ddbb284..2a4b056 100644 --- a/bpkg/auth.cxx +++ b/bpkg/auth.cxx @@ -655,7 +655,7 @@ namespace bpkg // Make sure that the repository canonical name hostname matches the // certificate hostname (that can contain a subdomain wildcard), and its - // optional /prefix/path (will call it just path down the road) part is a + // optional prefix/path (will call it just path down the road) part is a // subpath of the certificate name path. // // Split a name into the host and path parts. @@ -664,7 +664,9 @@ namespace bpkg { size_t p (name.find ('/')); return make_pair (name.substr (0, p), - p != string::npos ? path (name.substr (p)) : path ()); + p != string::npos + ? path (name.substr (p + 1)) + : path ()); }; pair c (split (cert.name)); -- cgit v1.1