summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2021-06-09 13:09:38 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2021-10-18 15:49:10 +0200
commitc8e5008794f07afa1e9c139249c682eb5745fc25 (patch)
treea74a96ac6f23884df9fc9a055fa9bd04d0605a3e /apt-pkg
parentad7bae309a827592aa228af9470c1aa7abdd189e (diff)
acquire-item: Quote Signed-By before sending it
This currently has no effect, as there are no quotable characters inside it, but it will allow us to send embedded keys through to the method.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index eb8053feb..a4a6bc4a3 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1912,7 +1912,7 @@ string pkgAcqMetaClearSig::Custom600Headers() const
Header += "\nFail-Ignore: true";
std::string const key = TransactionManager->MetaIndexParser->GetSignedBy();
if (key.empty() == false)
- Header += "\nSigned-By: " + key;
+ Header += "\nSigned-By: " + QuoteString(key, "");
return Header;
}
@@ -2168,7 +2168,7 @@ std::string pkgAcqMetaSig::Custom600Headers() const
std::string Header = pkgAcqTransactionItem::Custom600Headers();
std::string const key = TransactionManager->MetaIndexParser->GetSignedBy();
if (key.empty() == false)
- Header += "\nSigned-By: " + key;
+ Header += "\nSigned-By: " + QuoteString(key, "");
return Header;
}
/*}}}*/