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

Temporary file can overwrite and delete arbitrary files #59

Open
michitux opened this issue Sep 5, 2011 · 0 comments
Open

Temporary file can overwrite and delete arbitrary files #59

michitux opened this issue Sep 5, 2011 · 0 comments

Comments

@michitux
Copy link

michitux commented Sep 5, 2011

In the media_upload_xhr()-function there is no check if the $id is a safe filename. For example if you enter "../../../conf/local.php" as id in the upload form, the configuration file is first replaced by the uploaded file and then deleted. This happens before any security check apart from the security token is done.

There can also be more problems like characters that aren't allowed in a filename so my recommendation is to simply use the md5 sum of the id as filename.

akate added a commit that referenced this issue Sep 6, 2011
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

1 participant