[TYPO3-core] RFC Bug #11450: Install tool access check should take IPv6 loopback into account

Oliver Klee typo3-german-02 at oliverklee.de
Tue Jun 30 11:43:13 CEST 2009


Hi,

-1 on reading because the closing parenthesis is at the wrong place:

-if (1==2 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1' &&
!is_file($enableInstallToolFile))) {
+if (1==2 || ($_SERVER['REMOTE_ADDR']!='127.0.0.1' &&
$_SERVER['REMOTE_ADDR']!='::1') && !is_file($enableInstallToolFile)) {

So you've changed the condition from

  if (a || (b && !c))

to

  if (a || (b && d) && !c)

(This still works because && has a higher precedence than ||, but the
code shouldn't rely on this.)

To make this clearer, you could ...
  1. fix the parenthesis :-)
  2. break the line to be shorter than 80 characters (if possible,
     use line breaks in a way to make the structure of the condition
     clearer)
  3. use spaces around the == and !=
  4. use parenthesis around the sub conditions


Oliver


More information about the TYPO3-team-core mailing list