Skip to content

Commit

Permalink
spaces and dollar signs should not be allowed in host names
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrechet committed Apr 26, 2015
1 parent 42c244b commit ab5e826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/rwinrm
Expand Up @@ -32,7 +32,7 @@ def parse_options
options = {}
fail 'Missing required options' unless ARGV.length == 1

m = /^(?<user>[a-z0-9\.\!\$ _-]+)@{1}(?<host>[a-z0-9\.\$ -]+)(?<port>:[0-9]+)?/i.match(ARGV[0])
m = /^(?<user>[a-z0-9\.\!\$ _-]+)@{1}(?<host>[a-z0-9\.\-]+)(?<port>:[0-9]+)?/i.match(ARGV[0])
fail "#{ARGV[0]} is an invalid host" unless m
options[:user] = m[:user]
options[:endpoint] = "http://#{m[:host]}#{m[:port] || ':5985'}/wsman"
Expand Down

0 comments on commit ab5e826

Please sign in to comment.