Browse Source

lookup login info for proxies in auth.conf

On HTTP Connect we since recently look into the auth.conf file for login
information, so we should really look for all proxies into the file as
the argument is the same as for sources entries and it is easier to
document (especially as the manpage already mentions it as supported).
tags/debian/1.5_beta2
David Kalnischkies 4 years ago
parent
commit
6291fa81da
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      methods/basehttp.cc
  2. +3
    -1
      test/integration/test-authentication-basic

+ 1
- 1
methods/basehttp.cc View File

@@ -847,6 +847,7 @@ bool BaseHttpMethod::Configuration(std::string Message) /*{{{*/
/*}}}*/
bool BaseHttpMethod::AddProxyAuth(URI &Proxy, URI const &Server) /*{{{*/
{
MaybeAddAuthTo(Proxy);
if (std::find(methodNames.begin(), methodNames.end(), "tor") != methodNames.end() &&
Proxy.User == "apt-transport-tor" && Proxy.Password.empty())
{
@@ -857,7 +858,6 @@ bool BaseHttpMethod::AddProxyAuth(URI &Proxy, URI const &Server) /*{{{*/
else
Proxy.Password = std::move(pass);
}
// FIXME: should we support auth.conf for proxies?
return true;
}
/*}}}*/

+ 3
- 1
test/integration/test-authentication-basic View File

@@ -95,7 +95,9 @@ rewritesourceslist "http://localhost:${APTHTTPPORT}"

msgmsg 'proxy to server basic auth'
webserverconfig 'aptwebserver::request::absolute' 'uri'
export http_proxy="http://localhost:${APTHTTPPORT}"
# using ip instead of localhost avoids picking up the auth for the repo
# for the proxy as well as we serve them both over the same server…
export http_proxy="http://127.0.0.1:${APTHTTPPORT}"
runtest "http://localhost:${APTHTTPPORT}"
unset http_proxy



Loading…
Cancel
Save