33366[BUGFIX] InstallTool should set SYS/trustedHostsPattern on initial install
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 1
Review log 17
-
Mathias Schreiber uploaded patch set 1 10/17/14, 15:55
-
Ingo Pfennigstorf commented on patch set 1 10/17/14, 16:39
One minor nitpick so farDefaultConfiguration.php:64Add space between if and ( -
Wouter Wolters commented on patch set 1 10/17/14, 16:40
small nitpickDefaultConfiguration.php:58true should be uppercase -
Markus Klein commented on patch set 1 10/17/14, 16:40
DefaultConfiguration.php:57space after if; CGLDefaultConfiguration.php:58Please, please, please never EVER do these kind of useless comparisons. This just brainfucks my head and uses unnecessary CPU cycles. If we can assume $currentConfiguration['SYS']['isInitialInstallationInProgress'] to be bool (which you imply be using strict comparison), we don't need to compare it to anything to finally get a bool. Generally I would prefer a !empty() check here, since we should also cover the case where the array index does not exist.DefaultConfiguration.php:62maybe use $GLOBALS, but I'm not sure what the rule is -
Mathias Schreiber uploaded patch set 2 10/17/14, 17:20
-
Mathias Schreiber uploaded patch set 3 10/17/14, 17:24
-
Markus Klein voted on patch set 3 CR +1 10/17/14, 17:27
-
Christian Kuhn commented on patch set 3 10/17/14, 21:05
thx! will review tomorrow. -
Helmut Hummel commented on patch set 3 CR -2 10/19/14, 10:20
What this patch does is set a trustedHostsPattern value based on the HTTP_HOST value during installation and thus pinning the TYPO3 installation to this host. I don't know how you install TYPO3, but I *never* install it on the production host with the live domain. The impact of this patch is that installation will work on the dev system (where it is installed), but (without additional manual interaction) not work any more on any other domain, while the current default will work securely on any host with a "normal" server setup. I understand the need for a better user experience in general and especially during and after installation and there are several things we can do about it in a different way: 1. Improve the default SERVER_NAME magic to be able to deal with more scenarios 2. Make allow all host default and add a report that suggest to change that setting for more security 3. Make allow all default for dev systems (Application context and Configuration Preset) Im fine with any of these -
Helmut Hummel commented on patch set 3 10/19/14, 11:26
Don't get me wrong, I agree that things can and should be improved in this area. But simply pinning the pattern to the host name during installation makes it even worse for many users. So we need to choose a different approach from the list in my previous comment. -
Mathias Schreiber commented on patch set 3 10/19/14, 11:38
> What this patch does is set a trustedHostsPattern value based on > the HTTP_HOST value during installation and thus pinning the TYPO3 > installation to this host. Just to add: It does so if you run a special environment where the servername (coming from the Webserver config) and the actual hostname differs. So there is no change to the current behavior, it just circumvents the case where the default breaks and sends you into an error message. > I don't know how you install TYPO3, but I *never* install it on the > production host with the live domain. Well, we do, but that should not be part of the discussion. I think about the users that have weird setups given by their hosters. We can't tell what's going on on those environments so there having a convenient fallback is a must-have for the product IMHO. > The impact of this patch is that installation will work on the dev > system (where it is installed), but (without additional manual > interaction) not work any more on any other domain, while the > current default will work securely on any host with a "normal" > server setup. Exactely. That's why the patch picks up the non-normal setups and provides a convenient way to deal with this situations. > I understand the need for a better user experience in general and > especially during and after installation and there are several > things we can do about it in a different way: > > 1. Improve the default SERVER_NAME magic to be able to deal with > more scenarios Preferable. I fear that we will not be able to grasp every weird setup there is in the wild > 2. Make allow all host default and add a report that suggest to > change that setting for more security I don't get what you mean here :) Do you mean something like trustedHostsPattern = '*'? I'm absolutely no security expert, but this seems to break the entire idea, doesn't it? > 3. Make allow all default for dev systems (Application context and > Configuration Preset) See above. I don't get what you mean. Maybe we can discuss this in Hannover or on Slack. Regarding your other comment: No offense taken. I'm just trying to scratch an itch I have here :) -
Helmut Hummel commented on patch set 3 10/19/14, 12:55
> Do you mean something like trustedHostsPattern = '*'? yes! > I'm absolutely no security expert, but this seems to break the entire idea, doesn't it? Yes and no. Before you could not improve the security by tweaking a setting, now you can. Yes, it decreases the security if arbitrary hostnames are allowed be passed. It is just that I'm tired to discuss things in this area over and over again. If everybody agrees that the current situation is too complicated for starters, let's just make the convenient and insecure setting the default and inform the user about that (reports module). I'm absolutely fine with that. I think in this area we have to sacrifice either convenience or security even if we throw a lot of additional effort on it, we cannot have both. So if you value convenience more, then fine with me, go ahead and make a patch that changes the default to allow all (and adds a report module check on it) I will approve it. -
Helmut Hummel commented on patch set 3 10/19/14, 13:01
> That's why the patch picks up the non-normal setups and provides a convenient way to deal with this situations. I tried to outline that the patch improves the situation for some, and makes it worse for other users. Instead of shifting the problem from one side to the other, we should should just decide to choose a different default (which was my initial approach, but quite some people pledged to not have to touch their installations to improve the security in that area, but have something secure by default). There are however a gazillion possibilities how you could set up your server which we will never be able to cover by default. So the best I can imagine (for convenience) is to change the default to allow all provided host names. -
Helmut Hummel commented on patch set 3 10/19/14, 13:03
> Maybe we can discuss this in Hannover Yes please. :) -
Christian Kuhn commented on patch set 3 11/03/14, 15:38
i'm in for a decision in hannover and will now play through installation again to get full picture of current status in this area. -
Helmut Hummel commented on patch set 3 11/03/14, 16:14
yes please. let's discuss this again btw.: this one is related: https://review.typo3.org/#/c/30577/ -
Mathias Schreiber abandoned the change 12/07/14, 15:45
let's do this some other time