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

bug: stacked inside statements cause relative path escape #256

Open
erikh opened this issue Jul 20, 2017 · 0 comments
Open

bug: stacked inside statements cause relative path escape #256

erikh opened this issue Jul 20, 2017 · 0 comments

Comments

@erikh
Copy link
Member

erikh commented Jul 20, 2017

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant