Skip to content

Commit b344dd9

Browse files
fix: add protocol guard to servers:add rake task (#1006)
Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
1 parent 4d62cda commit b344dd9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/tasks/servers.rake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ namespace :servers do
2626
puts('Error: Please input at least a URL and a secret!')
2727
exit(1)
2828
end
29+
30+
unless args.url.start_with?('http://', 'https://')
31+
puts('Error: Server URL must start with http:// or https://')
32+
exit(1)
33+
end
34+
2935
tmp_load_multiplier = 1.0
3036
unless args.load_multiplier.nil?
3137
tmp_load_multiplier = args.load_multiplier.to_d

0 commit comments

Comments
 (0)