Review main Merged

48028[BUGFIX] Enforce processing folder generation

Nicole Hummel CR +2 V +2 Easy +20 −3 updated 07/07/16, 05:31

Commit message

If the processing folder of a storage was deleted and the current user
isn't allowed to create new folders, an exception is thrown. This patch
turns off the access check to allow generation of the processing folder.

Review

  • Code review CR +2
    • Susi Moog +2
    • Frank Nägler +1
    • Michael Oehlhof +1
  • Verified V +2
    • Susi Moog +2
    • Frank Nägler +1
    • Michael Oehlhof +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2829

Show 4 earlier messages
  1. Nicole Hummel uploaded patch set 1 05/06/16, 18:19

  2. Nicole Hummel rebased onto patch set 2 05/06/16, 19:42

  3. Nicole Hummel uploaded patch set 3 05/06/16, 19:43

  4. Wouter Wolters voted on patch set 3 CR +1 05/07/16, 09:09

  1. Frans Saris commented on patch set 3 CR +1 05/07/16, 10:50

    Maybe add some unit tests?
  2. Riccardo De Contardi commented on patch set 3 05/07/16, 15:22

    I removed the permission "Directory: Write" from both the BE usergroup and the BE user; after applying the patch the error about the _processed_ folder has gone away, but I am not able to upload file
  3. Nicole Hummel commented on patch set 3 05/08/16, 10:46

    @Riccardo: That is perfectly fine. If you remove write access for an user, that one can't add any files.
  4. Nicole Hummel commented on patch set 3 05/08/16, 10:47

    @Frans: any idea how to test that one?
  5. Jessica Jagodzinski commented on patch set 3 CR +1 V +1 05/09/16, 07:07

    Patch works for me in TYPO3 7.6.6
  6. Frank Nägler commented on patch set 3 CR -1 05/09/16, 08:57

    temporary -1 1) Really for 6.2? Is this edge case important enough? 2) See my inline comment, imho catching the exception is not needed anymore.

    ResourceStorage.php:2908

    can this exception thrown anymore?
  7. Nicole Hummel commented on patch set 3 05/09/16, 11:57

    I opt to backport the patch to 6.2 as there is no workaround for editors if the folder doesn't exist.

    ResourceStorage.php:2908 Reply

    Core wise the permissions shouldn't be thrown anymore, but in \TYPO3\CMS\Core\Resource\ResourceStorage::createFolder there is a signal which can be used by extensions which might throw own exceptions. I opt to leave it this way.
  8. Frank Nägler commented on patch set 3 CR 0 05/09/16, 12:08

    thx for answering, if you are really sure we need it in 6.2 I am fine, but I think this is an edge case. I am also fine for catching the extension.
  9. Zbigniew Jacko voted on patch set 3 CR +1 V +1 05/09/16, 14:21

  10. Frank Nägler commented on patch set 3 CR -1 06/06/16, 17:14

    I need to give -1 again. After review the patch and the issue again, this problem can't occur in 6.2 because the nested hashed subfolder was introduced only for master and 7.6. The issue is also reported only for 7. I can't see any reason, why the problem should occur before 7.6
  11. Nicole Hummel commented on patch set 3 06/07/16, 08:01

    @Frank: The problem has nothing to do with any new patch. The problem exists even in 6.2 if the processing folder of a storage isn't available and the user has no rights to add new folders.
  12. Susi Moog commented on patch set 3 06/07/16, 09:41

    The problem the reporter of the issue had is actually related to the nested subfolder feature, because as the issue description states, he/she did not remove _processed_ but only the files and folders in it. Clearing the processed folder is probably a valid usage of the system, but I'd say deleting the whole _processed_ folder is not - as that means that you are intentionally deleting a system relevant folder without ensuring the presence of that folder afterwards. So I'd be fine with master and 7.6, but not really sure about 6.2.
  13. Nicole Hummel commented on patch set 3 06/07/16, 10:44

    Deleting typo3temp and/or subfolders triggers generation of this folders automatically as well. Why do we make a difference for the processing folder here? I don't see any good reason. But if you prefer to not backport this patch to 6.2 simply change the commit message, vote and maybe merge this patch
  14. Frank Nägler commented on patch set 3 CR +1 V +1 06/15/16, 12:58

    works for master and 7.6
  15. Michael Oehlhof voted on patch set 3 CR +1 V +1 06/27/16, 18:30

  16. Susi Moog updated the commit message in patch set 4 07/05/16, 07:10

  17. Susi Moog voted on patch set 4 CR +1 V +1 07/05/16, 07:11

  18. TYPO3com voted on patch set 4 V +1 07/05/16, 07:16 Completed build in 05m 08s on Tue, 5 Jul, 09:16 AM Test Summary: 9651 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-455

  19. Frank Nägler voted on patch set 4 CR +1 V +1 07/05/16, 10:57

  20. Michael Oehlhof voted on patch set 4 CR +1 V +1 07/05/16, 19:45

  21. Sascha Egerer commented on patch set 1 07/06/16, 15:40

    ResourceStorage.php:2884

    Does this ltrim make sense at all? And if yes why not at line 2877?
  22. Nicole Hummel commented on patch set 1 07/06/16, 15:52

    ResourceStorage.php:2884 Reply

    IMHO this is needed as the identifier starts with a slash but the createFolder() expects a (valid) folder name
  23. Susi Moog voted on patch set 4 CR +2 V +2 07/07/16, 05:30

  24. Gerrit merged patch set 4 07/07/16, 05:30

  25. Susi Moog commented on patch set 5 07/07/16, 05:31

    Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit 9d452338fe1cce9fb18b38917b450dbce6c0d0b5