diff options
author | Alex Legler <alex@a3li.li> | 2015-02-19 20:04:35 +0100 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2015-02-19 20:04:35 +0100 |
commit | acc7cfb135bd45337bf48435b9bd1c057394523a (patch) | |
tree | 8b5df348dc0fcdc5c14a5828169ec9f54d5480a1 /ag | |
parent | Initial version (diff) | |
download | backend-acc7cfb135bd45337bf48435b9bd1c057394523a.tar.gz backend-acc7cfb135bd45337bf48435b9bd1c057394523a.tar.bz2 backend-acc7cfb135bd45337bf48435b9bd1c057394523a.zip |
Do some basic mailing list name validation
Diffstat (limited to 'ag')
-rwxr-xr-x | ag | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -53,7 +53,11 @@ op = OptionParser.new do |opts| end opts.on('--list NAME', 'Name of the mailing list to work with') do |name| - $options.name = name + if name =~ /^[a-zA-Z-]+$/ + $options.name = name + else + abort 'List name can only consist of letters and hyphens.' + end end opts.on('--file', 'The argument is a file') do |