]> git.donarmstrong.com Git - debbugs.git/blobdiff - lib/Debbugs/Control.pm
encode addresses before checking if they are valid
[debbugs.git] / lib / Debbugs / Control.pm
index 1f8b3aac60d3cb98fe5264795fc7806e795c4bac..4396b057f2ff697369f4abd53912b0df62b6ae61 100644 (file)
@@ -96,7 +96,7 @@ BEGIN{
                     package => [qw(set_package)],
                     block   => [qw(set_blocks)],
                     merge   => [qw(set_merged)],
-                    tag     => [qw(set_tag)],
+                    tag     => [qw(set_tag valid_usertag)],
                     clone   => [qw(clone_bug)],
                     archive => [qw(bug_archive bug_unarchive),
                                ],
@@ -3295,6 +3295,20 @@ sub bug_unarchive {
      __end_control(%info);
 }
 
+=head2 valid_usertag
+
+     valid_usertag
+
+This checks if the usertag contains valid characters or not.
+
+=cut
+
+sub valid_usertag {
+    my $usertag = shift;
+    return $usertag =~ m/^[a-zA-Z0-9.+\@-]+$/;
+}
+
+
 =head2 append_action_to_log
 
      append_action_to_log