From 80282d1830fe31d87c1b67437f17df9a9001c633 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 30 Jan 2019 13:43:29 +0100 Subject: Disable deprecated methods (ftp, rsh, ssh) by default These methods are not supposed to be used anymore, they are not actively maintained and may hence contain odd bugs. Fixes !49 --- apt-pkg/acquire-worker.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index c2bbf8bed..b36186121 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -98,6 +98,8 @@ bool pkgAcquire::Worker::Start() std::string Method; if (_config->Exists(confItem)) Method = _config->FindFile(confItem.c_str()); + else if (Access == "ftp" || Access == "rsh" || Access == "ssh") + return _error->Error(_("The method '%s' is unsupported and disabled by default. Consider switching to http(s). Set Dir::Bin::Methods::%s to \"%s\" to enable it again."), Access.c_str(), Access.c_str(), Access.c_str()); else Method = _config->FindDir(methodsDir) + Access; if (FileExists(Method) == false) -- cgit v1.2.3