aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2026-05-06 21:26:03 -0700
committerDan Fandrich <danf@mageia.org>2026-05-06 21:26:03 -0700
commitbe8028c930f9e85ede81a90255842296dd23aea8 (patch)
treee81a9bfdbaaf1c89ae11dd9c84e12cdfd8eb0ef4
parentdc7169cf947eb4bb0ad853d09ebf8b1cedb5c39f (diff)
downloadmgaadvisories-master.tar
mgaadvisories-master.tar.gz
mgaadvisories-master.tar.bz2
mgaadvisories-master.tar.xz
mgaadvisories-master.zip
Expand the definition of word when looking for dupesHEADmaster
Consider some non-alphabetic characters as words to expand the check to catch things like duplicate package names.
-rw-r--r--lib/MGA/Advisories.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index f097236..bfc94ae 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -315,7 +315,7 @@ sub assign_id {
}
# Look for errors in the subject and description
- if ( $adv->{subject} =~ /\b(\w+)\s+\1\s/ ) {
+ if ( $adv->{subject} =~ /\b([-_\d\w]+)\s+\1\s/ ) {
print STDERR "Subject has a duplicated word\n";
return;
}
@@ -328,7 +328,7 @@ sub assign_id {
# given that this check succeeds in eliminating these typos 95% of the
# time, it's probably worth forcing the user to reword the description in
# these rare cases.
- if ( $adv->{description} =~ /\b(\w+)\s+\1\s/ ) {
+ if ( $adv->{description} =~ /\b([-_\d\w]+)\s+\1\s/ ) {
print STDERR "Description has a duplicated word\n";
return;
}