summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-09-26 19:05:27 +0200
committerJulian Andres Klode <jak@debian.org>2025-09-26 19:05:27 +0200
commit771d3e1d82cdf9286a002ef379a3edc7d62688f3 (patch)
treeec318f6487f3df6daacc7a4fbf47c2ff9673d7d5 /apt-private
parent0c1fa8bae3a09f9efd1b30ebc3a5dacbbe58f193 (diff)
history-list: reject any arguments provided
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-history.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-private/private-history.cc b/apt-private/private-history.cc
index 5057ed0d6..05c908471 100644
--- a/apt-private/private-history.cc
+++ b/apt-private/private-history.cc
@@ -205,6 +205,9 @@ bool DoHistoryList(CommandLine &Cmd)
{
HistoryBuffer buf = {};
+ if (Cmd.FileSize() != 1)
+ return _error->Error("This command does not support any arguments");
+
if (not ParseLogDir(buf))
return _error->Error(_("Could not read: %s"),
_config->FindFile("Dir::Log::History").data());