Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement request/Security question #5

Open
walterbender opened this issue Dec 27, 2016 · 3 comments
Open

Enhancement request/Security question #5

walterbender opened this issue Dec 27, 2016 · 3 comments

Comments

@walterbender
Copy link

Please see:
https://github.com/walterbender/turtleblocksjs/issues/296#issuecomment-269242555

There is both an enhancement request, but more importantly, a security question.

@i5o
Copy link
Contributor

i5o commented Dec 28, 2016

I think that instead of replacing the files, you could add some "random" characters to the end,

"file.tb"
"random_file.tb", similar like GCI website does (but in GCI the random thing is the task id).
Also: "random" needs to be generated from server side, and not client side.

  • limit the file extension to ".tb" (server side too)

@samdroid-apps
Copy link

samdroid-apps commented Dec 28, 2016 via email

@tchx84
Copy link
Owner

tchx84 commented Dec 29, 2016

Can someone send a test to reproduce this?

IIRC the server prevents writing anywhere but the projects directory, see https://github.com/tchx84/turtleblocksjs-server/blob/master/server.py#L56 (the project_id is the file name, and should get escaped).

In general, this server never intended to enforce concepts of users or file uniqueness (or any logic at all), this is supposed to be a temporary hack to save and retrieve files using a simple API. I think it would be a great opportunity to ditch it and use or write a proper files backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants