Skip to content

Commit

Permalink
fix: add protocol guard to servers:add rake task (#1006)
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmad Farhat <[email protected]>
  • Loading branch information
scouillard and farhatahmad authored Nov 10, 2023
1 parent 4d62cda commit b344dd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/tasks/servers.rake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ namespace :servers do
puts('Error: Please input at least a URL and a secret!')
exit(1)
end

unless args.url.start_with?('http://', 'https://')
puts('Error: Server URL must start with http:// or https://')
exit(1)
end

tmp_load_multiplier = 1.0
unless args.load_multiplier.nil?
tmp_load_multiplier = args.load_multiplier.to_d
Expand Down

0 comments on commit b344dd9

Please sign in to comment.