32610[BUGFIX] Re-enables fileDenyPattern check for admin users
Commit message
Review
-
Code review CR +2
- Helmut Hummel +2
- Markus Klein +1
- Nicole Hummel +1
-
Verified V +2
- Helmut Hummel +2
- Markus Klein +1
- Nicole Hummel +1
Issues 1
Files 2
Review log 50
Show 25 earlier messages
-
Torben Hansen uploaded patch set 1 09/06/14, 12:27
-
Markus Klein commented on patch set 1 09/06/14, 16:44
An admin user can do anything anyway, so why limiting the file extensions? -
Anja Leichsenring commented on patch set 1 CR +1 V +1 09/06/14, 18:14
Markus, the file deny pattern must apply to admin users as well, so this patch is a valid bugfix. When an admin is able to upload an executable file - you can imagine where this leads? -
Christian Kuhn commented on patch set 1 CR -1 09/06/14, 18:41
-1 until this was verified by a security / fal team member who introduced the check in the first place. -
Anja Leichsenring wrote 12/07/14, 20:20
Removed the following approvals: * Code-Review+1 by Anja Leichsenring <aleichsenring@ab-softlab.de> * Verified+1 by Anja Leichsenring <aleichsenring@ab-softlab.de> -
Mathias Schreiber wrote 12/17/14, 20:37
Topic set to FAL -
Helmut Hummel commented on patch set 1 CR -1 01/29/15, 19:32
ResourceStorage.php:694Just removing this would enable webspace fiel extension permissions for admin users, which is not intendedResourceStorage.php:696Instead the check should be moved here: if (!isAllowed) { return false; }elseif(!$this->evaluatePermissions) { return true; } -
Torben Hansen uploaded patch set 2 01/31/15, 12:04
-
Markus Klein commented on patch set 2 01/31/15, 18:37
ResourceStorage.php:656This if is superfluous now. We return early if things are not allowed... -
Sascha Egerer uploaded patch set 3 02/01/15, 12:43
-
Sascha Egerer voted on patch set 3 V +1 CR +1 02/01/15, 12:44
-
Nicole Hummel commented on patch set 3 CR -1 02/01/15, 14:48
ResourceStorage.php:676no else needed. -
Markus Klein commented on patch set 3 CR -1 02/01/15, 14:55
Will push an update -
Sascha Egerer uploaded patch set 4 02/01/15, 14:58
-
Markus Klein uploaded patch set 5 02/01/15, 14:58
-
Sascha Egerer commented on patch set 4 02/01/15, 14:58
Ups sorry, i was faster. Is that the change you've expected? -
Markus Klein commented on patch set 4 02/01/15, 15:03
Actually your patch is more radical. I'm just evaluating if we're safe to do so, but I guess we are. -
Sascha Egerer uploaded patch set 6 02/01/15, 15:12
-
Markus Klein voted on patch set 6 CR +1 02/01/15, 21:15
-
Helmut Hummel voted on patch set 6 CR -1 02/02/15, 08:10
-
Helmut Hummel commented on patch set 6 02/02/15, 08:11
ResourceStorage.php:674if the extension is not in the list of allowed extensions and only a list of allowed of extensions is configured, we return true here now. -
Helmut Hummel uploaded patch set 7 02/02/15, 08:15
-
Helmut Hummel uploaded patch set 8 02/02/15, 08:40
-
Helmut Hummel commented on patch set 6 02/02/15, 08:40
ResourceStorage.php:672uhm, this was the case already before? don't get it Was this always the case that whitelisting only is not possible or is this a bug? -
Helmut Hummel commented on patch set 8 CR -1 02/02/15, 08:41
Added some test, so that we can add more and find an agreement on expected bahavior
-
Markus Klein commented on patch set 8 02/02/15, 09:34
I agree this is a bug, Helmut! If I look at the code, I'd say it was not implemented very carefully. eg the if (fileextension!=='') is completely superfluous IMHO. -
Sascha Egerer commented on patch set 8 02/02/15, 09:42
I don't think that an empty fileextension check is supoerflous because you don't need to define a file extension. And those files should not be selectable or only if that is defined in the allowed configuration. So this should be totally reworked it think -
Helmut Hummel commented on patch set 8 02/02/15, 18:37
OK, I see the following todos here: 1. Look up in documentation to identify expected behavior 2. align this with how code worked pre FAL 3. rethink if these expectations make sense and maybe come up with better once 4. put better expectations in tests for master 5. but "legacy" expectations in tests for 6.2 6. Adapt code to make tests green for master and 6.2 -
Markus Klein commented on patch set 8 07/09/15, 21:58
ping. please improve the patch or abandon it -
Torben Hansen commented on patch set 8 07/10/15, 13:53
I think it is ok to abandon the patch. So if no one protests, I'll abandon it in 2 days. -
Torben Hansen abandoned the change 07/13/15, 06:13
-
Torben Hansen restored the change 05/26/16, 19:34
-
Torben Hansen uploaded patch set 9 05/26/16, 19:34
-
Nicole Hummel voted on patch set 9 CR +1 05/26/16, 20:02
-
Nicole Hummel commented on patch set 9 V +1 05/26/16, 20:49
Unit and functional tests are ok -
Markus Klein commented on patch set 9 05/26/16, 22:55
ResourceStorageTest.php:159what is "to do" here? Please add a ticket for any ToDo. -
Frank Nägler commented on patch set 9 05/27/16, 07:54
I opt for not backport this patch to 6.2 I think this is not an important enough, because the check is missing only for admins. -
Nicole Hummel commented on patch set 9 05/27/16, 07:58
@Frank: We get a lot of reports for this issue. Furthermore this would ensure file uploads in frontend as well. -
Frank Nägler commented on patch set 9 05/27/16, 08:00
ok, only my opinion, I will not down vote the patch. -
Torben Hansen uploaded patch set 10 05/27/16, 08:38
-
Nicole Hummel voted on patch set 10 CR +1 V +1 05/27/16, 08:45
-
Markus Klein commented on patch set 11 05/27/16, 10:32
Published edit on patch set 10. -
Markus Klein voted on patch set 11 CR +1 V +1 05/27/16, 10:36
-
Nicole Hummel voted on patch set 11 CR +1 V +1 05/27/16, 10:45
-
Helmut Hummel commented on patch set 11 CR +2 V +2 05/27/16, 11:42
Great we tackled this finally! -
Gerrit merged patch set 11 05/27/16, 11:43
-
Wouter Wolters commented on patch set 12 05/27/16, 12:11
Cherry Picked This patchset was cherry picked to branch TYPO3_7-6 as commit eb7a838cb9c70d6713179e0843745f211be6b8e4 -
Oliver Hader commented on patch set 12 06/04/16, 15:00
IMO this adds a regression in 6.2. In my case .htaccess files are written using the low-level API Folder::createFile() executed by a CLI task runner which fails now. Checking the file-deny pattern should happen much earlier in the process chain, when it's clear that really a file has been uploaded in the TYPO3 backend... -
Helmut Hummel commented on patch set 12 06/04/16, 18:37
Conceptually php files or .htaccess files do not belong in a FAL storage (think of other drivers or CDN). But true, this is breaking if people use(d) the API for creating such files. Putting the check in a different place is wrong imho, as we would need to apply this security check over and over again. I'm currently undecided. I would really like to keep this change, but maybe we need to reconsider the implementation for 6.2 and 7.6 -
Helmut Hummel commented on patch set 12 06/06/16, 14:13
The following considerations: This change disallows creating PHP files (and .htaccess) via GUI in FAL storages. This includes users with admin permissions. Previously some actions failed for admins with error message (uploading PHP files), some actions worked (renaming a file to end with .php) This lead to confusion, security reports, added exploits to exploit databases and downgrading security of TYPO3 as a whole in security audits done by gouvernemental agencies. The conclusion: The conclusion drawn from that, was to make the behavior consistent for admins and disallow PHP file creation always and in all situations. The patch here in question does that, but add some more restrictions (besides admins not being able to create PHP files): 1. Creation of PHP files in FAL storage is now also forbidden for frontend extensions 2. Creation of PHP files in FAL storage is now also forbidden for CLI scripts I understand that these additional restrictions may cause some issues for released branches. My suggestion would be the following: Suggestion how to proceed: 1. Keep the behavior for admins introduced with this patch (this was the main need we wanted to tackle) 2. Allow creation of PHP files in CLI context for TYPO3 7.6 and 6.2, but throw a (deprecation) warning when this happens 3. Depending whether we prioritize additional security (deny PHP files in FAL by default) or not (extension authors must check this on their own), we can disable this check for FE as well (including throwing the warning) 4. For master add a breaking.rst