Skip to content

Fix unsafe system calls to use array form in pack_generator.rb #1910

@justin808

Description

@justin808

Summary

Update system calls in lib/react_on_rails/dev/pack_generator.rb to use the safer array form instead of string form.

Details

The current implementation uses string-based system calls which are less safe:

system "bundle exec rake react_on_rails:generate_packs > /dev/null 2>&1"
system "bundle exec rake react_on_rails:generate_packs"

These should be updated to use the array form for better security and cross-platform compatibility.

Related Branch

This fix was identified in the justin808/shakapacker-9.3.0 branch (commit 7f902cf).

Impact

  • Security/safety improvement
  • Better cross-platform compatibility
  • Prevents potential shell injection issues

Files Changed

  • lib/react_on_rails/dev/pack_generator.rb (2 lines changed)

Labels

  • Easy
  • Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions