aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MGA
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-06-17 14:31:41 +0000
committerNicolas Vigier <boklm@mageia.org>2013-06-17 14:31:41 +0000
commitadb46fcb63bced2025c302d4ee4b44be8b23c592 (patch)
treeb97c3bd65f6d674c09513982dc4a0fb3ea4d925d /lib/MGA
parent196dd77df000d216f408df22861fe3c3c93e0cac (diff)
downloadmgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar
mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar.gz
mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar.bz2
mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar.xz
mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.zip
get_advisories_from_dir(): Check advisory type
Diffstat (limited to 'lib/MGA')
-rw-r--r--lib/MGA/Advisories.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 8c8bab2..fed9caa 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -60,6 +60,8 @@ sub get_advisories_from_dir {
my $adv = LoadFile($advfile);
next unless $adv->{ID};
report_exit("Duplicate advisory $adv->{ID}") if $advisories{$adv->{ID}};
+ report_exit("Unknown type $adv->{type}") unless
+ $config->{advisory_types}{$adv->{type}};
$advisories{$adv->{ID}} = $adv;
my $statusfile = status_file($adv->{ID});
$adv->{status} = -f $statusfile ? LoadFile($statusfile) : {};