lib/zold/commands/routines/spread.rb in zold-0.26.19 vs lib/zold/commands/routines/spread.rb in zold-0.29.20
- old
+ new
@@ -18,10 +18,11 @@
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+require 'shellwords'
require_relative '../../log'
require_relative '../../id'
require_relative '../../copies'
require_relative '../push'
@@ -45,10 +46,10 @@
def exec(_ = 0)
sleep(60) unless @opts['routine-immediately']
@wallets.all.sample(100).each do |id|
next if Copies.new(File.join(@copies, id)).all.count < 2
Push.new(wallets: @wallets, remotes: @remotes, log: @log).run(
- ['push', "--network=#{@opts['network']}", id.to_s]
+ ['push', "--network=#{Shellwords.escape(@opts['network'])}", id.to_s]
)
end
end
end
end