From a5859bafdaa6bcf12934d0fb1715a5940965e13a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 10 Jul 2020 20:19:31 +0200 Subject: Don't re-encode encoded URIs in pkgAcqFile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit potentially breaks code feeding apt an encoded URI using a method which does not get URIs send encoded. The webserverconfig requests in our tests are an example for this – but they only worked before if the server was expecting a double encoding as that was what was happening to an encoded URI: so unlikely to work as expected in practice. Now with the new methods we can drop this double encoding and rely on the URI being passed properly (and without modification) between the layers so that passing in encoded URIs should now work correctly. --- test/interactive-helper/aptwebserver.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc index 57d215a65..58ba54f84 100644 --- a/test/interactive-helper/aptwebserver.cc +++ b/test/interactive-helper/aptwebserver.cc @@ -630,7 +630,7 @@ static bool handleOnTheFlyReconfiguration(std::ostream &log, int const client,/* size_t const pcount = EncodedParts.size(); std::vector parts(pcount); for (size_t i = 0; i < pcount; ++i) - parts[i] = DeQuoteString(DeQuoteString(EncodedParts[i])); + parts[i] = DeQuoteString(EncodedParts[i]); if (pcount == 4 && parts[1] == "set") { _config->Set(parts[2], parts[3]); -- cgit v1.2.3-18-g5258