Skip to content

Commit

Permalink
Validate new queue name is not nil and not zero length
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Jan 23, 2015
1 parent e4c46f8 commit 7cbdad7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/queuemgr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def init
# No '.' or '/' since that could change path
# Basically it should just be alphanum and '-' or '_'
def valid_queue_name(name)
return false unless name
return false unless name.length > 0
nil == name.tr('/. ,;:@"(){}\\+=\'^`#~?[]%|$&<>', '*').index('*')
end

Expand Down

0 comments on commit 7cbdad7

Please sign in to comment.