Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

bug: stacked inside statements cause relative path escape #256

@erikh

Description

@erikh

This is not a security issue, just a bug in how we handle inside statements.

inside "/one" do
  inside "two" do
  end
  
  inside "three" do
  end
end

Right now, inside works with two but chdirs back to the workdir for three. I think this is caused by the inner end statement not handling its escape appropriately. This shouldn't be too hard to keep a stack for on the side so we can track it easier.

Workaround for now is to flatten inside statements and then use a constant/variable to scope each block, e.g.:

BUILD_DIR = "/one"

inside "#{BUILD_DIR}/two" do
end

inside "#{BUILD_DIR}/three" do
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions