Review main Merged

6942[BUGFIX] PHP warning if open_basedir is enabled

Dmitry Dulepov CR +2 V +2 Easy +8 −4 updated 06/03/13, 20:49

Commit message

When using flexforms, a warning may appear in the Backend when
saving the form in BE (typically in a plugin). This happens
because TYPO3 checks if flexform DS is static (in the file)
using is_file. When the DS is not static, the parameter
to is_file is not a file name but an XML content. PHP
thinks this "file name" falls outside of the open_basedir
and complains with a warning. Possibly it can be solved
in other ways but this fix is the simplest possible.

Review

  • Code review CR +2
    • Steffen Ritter +2
    • Oliver Klee +1
    • Markus Klein +1
  • Verified V +2
    • Steffen Ritter +2
    • Markus Klein +1

Issues 1

Files 1

Review log 32

Show 7 earlier messages
  1. Dmitry Dulepov commented on patch set 2 08/19/12, 13:23

    Thank you :)
  2. Dmitry Dulepov commented on patch set 2 08/19/12, 13:23

    Markus, I cannot find any differences in patch #2. Could you describe what was changed, please? :) Thanks!
  3. Dmitry Dulepov commented on patch set 2 08/19/12, 13:23

    (1 inline comment)
  4. Dmitry Dulepov uploaded patch set 3 08/19/12, 13:23

  5. Dmitry Dulepov uploaded patch set 4 08/19/12, 13:23

  6. Dmitry Dulepov uploaded patch set 5 08/19/12, 13:23

  7. Dmitry Dulepov commented on patch set 5 08/19/12, 13:23

    (1 inline comment)
  1. Markus Klein uploaded patch set 2 08/19/12, 13:23

  2. Markus Klein commented on patch set 2 08/19/12, 13:23

    Just a typo in the commit message.
  3. Markus Klein commented on patch set 5 08/19/12, 13:23

    Looks good to me, but someone else must approve
  4. Markus Klein uploaded patch set 6 08/19/12, 13:23

  5. Markus Klein commented on patch set 6 08/19/12, 13:23

    Verified; Looks good to me, but someone else must approve Fixed typo in commit message. I cannot test this one, but by reading this issue should be fixed. Therefore V:+1
  6. Markus Klein commented on patch set 6 08/19/12, 13:23

    Is this really an issue in 4.5? Code looks completely different.
  7. Oliver Klee commented on patch set 2 08/19/12, 13:23

    (2 inline comments)

    class.t3lib_befunc.php:947

    Instead of introducing the error suppression, can't we check if the content is XML (by checking whether it contains < or >)?

    class.t3lib_befunc.php:4367

    Please don't add any Whitespace or LF after the ?>.

    class.t3lib_befunc.php:4367 Reply

    Okay, the whitespace actually gets removed. So please just ignore this particular comment. :-)
  8. Oliver Klee commented on patch set 2 08/19/12, 13:23

    (1 inline comment)
  9. Oliver Klee commented on patch set 2 08/19/12, 13:23

    (1 inline comment)
  10. Oliver Klee commented on patch set 4 08/19/12, 13:23

    Looks good. +1 for an updated patch if you fix the indentation.
  11. Oliver Klee commented on patch set 5 08/19/12, 13:23

    (1 inline comment)
  12. Oliver Klee commented on patch set 5 1 comment 08/19/12, 13:23

    Looks good to me, but someone else must approve
  13. Oliver Klee commented on patch set 6 08/19/12, 13:23

    Looks good to me, but someone else must approve
  14. Steffen Ritter commented on patch set 1 08/19/12, 13:23

    Verified; Looks good to me, but someone else must approve
  15. Steffen Ritter commented on patch set 6 V 0 08/19/12, 13:23

    by team member; Looks good to me, approved
  16. Steffen Ritter merged patch set 6 08/19/12, 13:23

  17. Sebastian Fischer commented on patch set 2 08/19/12, 13:23

    I would prefer that you didn't submit this

    class.t3lib_befunc.php:947 Reply

    I think something like this will do the job if (!preg_match('~^<.*>.*</.*>$~', $dataStructRec[$fName]) && is_file(PATH_site . $dataStructRec[$fName])) {
  18. Sebastian Fischer commented on patch set 4 08/19/12, 13:23

    Looks good to me, but someone else must approve Looks good to me. In general a < wont be present in a file name to should work as expected. Just one point. There are two lines not correct indented. I dont wont to block this just by nitpicking.
  19. Mr. Jenkins commented on patch set 1 08/19/12, 13:23

  20. Mr. Jenkins commented on patch set 2 08/19/12, 13:23

  21. Mr. Jenkins commented on patch set 3 08/19/12, 13:23

  22. Mr. Jenkins commented on patch set 4 08/19/12, 13:23

  23. Mr. Jenkins commented on patch set 5 08/19/12, 13:23

  24. Mr. Jenkins commented on patch set 6 08/19/12, 13:23

  25. Ernesto Baschny commented on patch set 6 08/19/12, 13:23

    Not an issue for 4.5, as "support for FlexForm file reference" was a new feature of TYPO3 4.6.0 (0627d1bb2e7780d0025e19735e8d86a9803e8e72).