ksafranski / Codiad-Terminal

Terminal Emulator Plugin for Codiad IDE
29 stars 25 forks source link

'JAILED' to cd within project directoly only. #12

Open HiroKws opened 10 years ago

HiroKws commented 10 years ago

Hi,

I have one enhancement idea.

Now user can change working directory anywhere by cd command. It is not secure.

So how about introduce 'JAILED' constant, and when it is true, user can move within only project directory.

It is not hard to implement, I think.

  1. Once move to user specified directory when used 'cd' command.
  2. Get absolute directory by 'pwd'.
  3. Compare if 'pwd' result will start with project root directory.
  4. If pwd result is not in project root, show error message, then just move to project root.

How about this?

ML, Hiro

hmrodrigues commented 9 years ago

I agree with @HiroKws

chadrien commented 8 years ago

:+1: