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

You have tried to upload file(s) that are not safe. #15466

Merged
merged 7 commits into from
Aug 15, 2017

Conversation

zero-24
Copy link
Contributor

@zero-24 zero-24 commented Apr 21, 2017

Pull Request for Issue #8903

Summary of Changes

If there is no info returned from JInputFiles get() you have tryed to upload unsave content. -> Tell that to the user.

Testing Instructions

Try to upload a zip file containing php scripts e.g. a extension using com_media.

Expected result

Error message: You have tryed to upload a save file that is not save.

Actual result

No message

Documentation Changes Required

None.

@zero-24 zero-24 added this to the Joomla 3.7.1 milestone Apr 21, 2017
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-staging labels Apr 21, 2017
@zero-24 zero-24 changed the title You have tryed to upload a save file that is not save. You have tryed to upload file(s) that are not safe. Apr 21, 2017
@@ -40,6 +40,7 @@ COM_MEDIA_ERROR_UNABLE_TO_DELETE=" Unable to delete: "
COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE="Unable to upload file."
COM_MEDIA_ERROR_UPLOAD_INPUT="Please input a file to upload"
COM_MEDIA_ERROR_WARNFILENAME="File name must only contain alphanumeric characters and no spaces."
COM_MEDIA_ERROR_WARNFILENOTSAFE="You have tryed to upload file(s) that are not safe."
Copy link
Contributor

@julienV julienV Apr 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 'you tried to...'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct it should be tried

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks fixed with the last commit.

@julienV
Copy link
Contributor

julienV commented Apr 21, 2017

this only fixes the issue for upload done in com_media, but not from other code using jinputfile get function... I still think raising an exception there is necessary, and here you should catch it instead of testing for empty $files

@zero-24
Copy link
Contributor Author

zero-24 commented Apr 21, 2017

i have just replyed to the other issue please open a PR with that exeption against the 4.0 branch and test the temp fix here. Thanks

@zero-24 zero-24 changed the title You have tryed to upload file(s) that are not safe. You have tried to upload file(s) that are not safe. Apr 21, 2017
@ghost
Copy link

ghost commented Apr 22, 2017

@zero-24 can you say a extension using com_media to test correctly?

@zero-24
Copy link
Contributor Author

zero-24 commented Apr 22, 2017

You can try to upload any extension (zip file) using com_media. I have tried a custom extension one.

@ghost
Copy link

ghost commented Apr 22, 2017

@zero-24 can you give me a Name for an Extension using com_media?

@zero-24
Copy link
Contributor Author

zero-24 commented Apr 22, 2017

Ah than you missunderstood that. You should just try to upload a zip file containing a extension. (or any other PHP code)

Like the weblinks package. As this is marked as unsafe file. The extension itself do not matter :)

@ghost
Copy link

ghost commented Apr 22, 2017

I have tested this item ✅ successfully on 1bc78ff

Tried upload com_patchtester.zip in "Media", got expected Error Message.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15466.

@joomla-cms-bot joomla-cms-bot removed this from the Joomla 3.7.1 milestone Apr 22, 2017
@ghost
Copy link

ghost commented Apr 22, 2017

Please reassign Milestone 3.7.1. Was removed cause set "Easy Test" on "Yes".

@infograf768 infograf768 added this to the Joomla 3.7.1 milestone Apr 22, 2017
@@ -40,7 +40,7 @@ COM_MEDIA_ERROR_UNABLE_TO_DELETE=" Unable to delete: "
COM_MEDIA_ERROR_UNABLE_TO_UPLOAD_FILE="Unable to upload file."
COM_MEDIA_ERROR_UPLOAD_INPUT="Please input a file to upload"
COM_MEDIA_ERROR_WARNFILENAME="File name must only contain alphanumeric characters and no spaces."
COM_MEDIA_ERROR_WARNFILENOTSAFE="You have tryed to upload file(s) that are not safe."
COM_MEDIA_ERROR_WARNFILENOTSAFE="You have tried to upload file(s) that are not safe."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about This file(s) is unsafe to upload. to be consistent with sentence structure as the following line?

@wilsonge wilsonge removed this from the Joomla 3.7.1 milestone May 2, 2017
@brianteeman brianteeman modified the milestone: Joomla 4.0 Jun 8, 2017
@zero-24
Copy link
Contributor Author

zero-24 commented Aug 13, 2017

Would be great to get some testers here? ;)

@wojsmol
Copy link
Contributor

wojsmol commented Aug 13, 2017

@zero-24 I will test this, give me one hour :)

@wojsmol
Copy link
Contributor

wojsmol commented Aug 13, 2017

I have tested this item ✅ successfully on 9304662


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15466.

@zero-24 zero-24 added this to the Joomla 3.8.0 milestone Aug 13, 2017
@zero-24
Copy link
Contributor Author

zero-24 commented Aug 13, 2017

Thanks.

@joomla-cms-bot joomla-cms-bot removed this from the Joomla 3.8.0 milestone Aug 13, 2017
@zero-24 zero-24 added the RTC This Pull Request is Ready To Commit label Aug 13, 2017
@zero-24 zero-24 added this to the Joomla 3.8.0 milestone Aug 13, 2017
@mbabker mbabker merged commit 61714e2 into joomla:staging Aug 15, 2017
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 15, 2017
@zero-24 zero-24 deleted the filesupload branch August 15, 2017 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants