Repository navigation
validate file name before uploading in upload only folder - #4212
Conversation
|
@individual-it, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @rullzer and @blizzz to be potential reviewers. |
fixes #4211 Signed-off-by: Artur Neumann <[email protected]>
|
I cannot find any tests for the upload-only page, are there any? |
|
perhaps here? |
That does look to me like its for public upload generally not specific for upload-only folders. So this function might be pretty untested, at least the JS side of it |
|
yes unfortunatly it is pretty untested... |
|
So, let's go out without for now? Or are you eager do add tests @individual-it? :) :) :) |
Generally speaking: Yes! Are you eager to pay me for that :-) ? My business partner @phil-davis (from Australia) and me (from Germany), we both lived in Nepal for the past 6/8 years and have worked here for an big NGO, now we have moved on and are in the process of starting a Software Development Company in Nepal @JankariTech Writing automated tests is exactly the service we are planing to offer. The idea is to teach young Nepali IT graduates to write good automated tests and to offer to write tests to companies that do not have enough testing for their projects. If you are interested happy to keep on talking by Email ([email protected]) or Skype |
Well, showing us and the rest of the world your test-writing-skills here would be the best possible advertisement for your new company 😉 |
Signed-off-by: Artur Neumann <[email protected]>
Signed-off-by: Artur Neumann <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #4212 +/- ##
============================================
+ Coverage 54.07% 54.08% +0.01%
Complexity 21589 21589
============================================
Files 1327 1328 +1
Lines 82303 82367 +64
Branches 1305 1311 +6
============================================
+ Hits 44509 44552 +43
- Misses 37794 37815 +21
|
Signed-off-by: Artur Neumann <[email protected]>
|
@schiessle @nickvergessen @blizzz Please review :) |
before uploading in a upload-only folder the file name was not checked with JS and no error was presented to the user if an invalid file was uploaded.
Even worse the UI would list the invalid file in the "Uploaded files" list.
This PR adds a check that is the same as in https://github.com/nextcloud/server/blob/master/apps/files/js/file-upload.js#L793
fixes #4211