diff options
author | Sam Bingner <sam@bingner.com> | 2019-04-10 21:21:22 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-04-10 21:21:22 -1000 |
commit | ff4a8039b2e1a4ff53f1114266b9bec24b174f81 (patch) | |
tree | aa6062812ea83865aee005e3e18d93d4360bb3d9 /apt-pkg/acquire-method.cc | |
parent | 6ff13d9bd5b09dd85f853ba543bfe350b06d186f (diff) | |
parent | 2f984e7730b341879db3cfd330c8443e48e6efb0 (diff) |
Merge tag '1.4.9'
apt Debian release 1.4.9
Diffstat (limited to 'apt-pkg/acquire-method.cc')
-rw-r--r-- | apt-pkg/acquire-method.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index ab0908014..bd947209b 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -458,6 +458,12 @@ void pkgAcqMethod::Status(const char *Format,...) * the worker will enqueue again later on to the right queue */ void pkgAcqMethod::Redirect(const string &NewURI) { + if (NewURI.find_first_not_of(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~") != std::string::npos) + { + _error->Error("SECURITY: URL redirect target contains control characters, rejecting."); + Fail(); + return; + } std::cout << "103 Redirect\nURI: " << Queue->Uri << "\n" << "New-URI: " << NewURI << "\n" << "\n" << std::flush; |