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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Prevent creating part files from the UI #7514
Conversation
isValidFileName() now flags part files are invalid names.
Added file name validity check before renaming or uploading.
@schiesbn @nickvergessen FYI |
|
Looks like uploading to a backend OC with this PR branch doesn't work, probably because it's prevent it to create a part file there. Need to find a better way. |
I am not sure this patch is such a good idea. Users should be able to call their files whatever they want. Have alternatives been considered? |
Choosing .part files was some kind of the lowest common denominator. For example web browser also use the .part extension for not finished downloads. The sync client also don't sync .part files because typically you don't want to upload unfinished downloads. We also discussed the idea to flag files in the filecache as "hidden" instead of using part files. I even started some prove of concept implementation some time ago but it turned out that this approach is also not that easy as we thought at the beginning. You can probably still find the closed pull request with this prove of concept which should also contains a discussion about the additional problems. So for now .part files are the solution and since we don't show/sync part files we shouldn't allow users to upload such files. Because this will leave the with files in their ownCloud, counting against their quota but we no option to access them or to delete the again. Even if we come back to the idea of the filecache flag at some point in time, we should still add this fixes for now. |
I'm kind of stuck on this as it seems to have unwanted side-effects. I think the main problem with uploading part files is only that it is then impossible to delete them afterwards from the UI or sync client. So maybe a part file cleaner process might be an alternative ? Note that in some cases stray part files might still lie around due to older bugs in the sabre connector. |
Just remembered why I was blocked here: we wanted to allow part file upload to remote ownCloud servers. BUT since OC 8.0 we already detect that and disable part files in the front ownCloud through 2e57fe9 This means that I should be able to continue this task 馃槃 |
|
That one might be risky as it would break s2s connecting from old OC 7 versions to newer OC 8.1. |
Well, I could maybe recycle this PR and at least keep the parts that work and defer the other ones for later instead of trying to provide a full solution (which isn't possible yet due to some blocking issues) |
... or go with a different approach that might require more duplicate code, but with less risk of breaking those special cases... |
I guess this isn't needed anymore once we move the Web UI to webdav? |
cc @PVince81 ^ |
This has nothing to do with WebDAV. The problem is that users are able to upload files called "test.part" with web UI or WebDAV. But currently this PR is blocked because: if we completely prevent uploading part files, then federation will not work any more because older OC versions like OC 7 don't have #13160. This means OC 7 instances would not be able to connect to OC 8.2 any more. I suggest we keep it open for now and reconsider maybe once OC 7 is out of support. |
#7496 <- there @schiesbn said, that upload of part files isn't possible via webdav. I just tested it and it works :( Then you're right. Sorry for the noise |
I don't really remember whether part files can or cannot be uploaded via WebDAV. If they don't then with a bit of luck moving the web UI to Webdav will fix it too 馃槃 I'll reconsider this PR once #12353 is closed. |
With "it works" I meant "I can upload .part files without any problem. ;) |
Haha okay. 馃槃 |
Can be revived when 7.0 is EOL'd |
@PVince81 @DeepDiver1975 Is this still needed ... looking to the new upload webdav endpoint 馃槈 |
There is currently no new upload webdav endpoint, still to be done. It won't change the main issue with this PR: the fact that this PR would break compatibility when connecting to OC 7 servers. However once OC 7 are not around any more, the work can continue. |
Since OC 7 will still be around when OC 9 is out, moving to 9.1. See #7514 (comment) for the explanation why. |
@PVince81 What is the status of this now that stable7 is EoL? |
Needs rebasing and careful retesting with fed shares to OC 8 and up. I'll see if I can find some time before the freeze to revive this... |
I'm closing this as this is old and needs to be redone anyway. No point in leaving a PR open for so long. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #7496
This PR prevents users to create part files from the web UI.
Since we changed an important utility method (isValidFileName), a few things need to be retested: