From e28378588618f059545db785b442ab3c8b92c5ce Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 13 Nov 2018 19:47:28 +0000 Subject: Only accept limited abbreviations of full package names. Automatically add the arch/noarch and .rpm extension, but don't allow incomplete or missing version numbers. We have wildcards and fuzzy versions for that. --- qarepo.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qarepo.pl b/qarepo.pl index 6444253..abbae63 100644 --- a/qarepo.pl +++ b/qarepo.pl @@ -547,7 +547,7 @@ sub sync_repo { my $pattern = wildcard_to_regexp($request); my $matched = 0; foreach my $candidate (keys %rpm_dependencies) { - if ($candidate =~ /^$pattern/) { + if ($candidate =~ /^($pattern)((\.($arch|noarch))?\.rpm)?$/) { $selection{$candidate} = 1; $selection{$_} ||= 2 foreach keys %{$rpm_dependencies{$candidate}}; $matched = 1; -- cgit v1.2.1