Review 9.5 Merged

60561[BUGFIX] Close file resource in FileLockStrategy if acquire failed

Susi Moog CR +2 V +2 Easy +4 −0 updated 04/26/19, 10:42

Commit message

When acquiring a lock via the FileLockStrategy it is very important
to close the underlying file handle again, if the acquire action failed.

The same instance of the FileLockStrategy might be reused later
(e.g. in TSFE) again, whereas the (still open) file could have been
deleted meanwhile. The file handle would be invalid and another try
to open the same file again - with fopen() - may fail.
The behaviour of PHP's fopen() is different depending on the actual
file storage. Currently things fail on host-mounted drives in
containers in Docker for Windows.

Review

  • Code review CR +2 Done
    • Susi Moog +2
  • Verified V +2 Done
    • Susi Moog +2
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 34

  1. Susi Moog commented on patch set 1 04/26/19, 08:15

    Cherry Picked from branch master.
  2. TYPO3com voted on patch set 1 V +1 04/26/19, 08:39 Completed build in 22m 55s on Fri, 26 Apr, 10:39 AM Test Summary: 50132 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC95-573

  3. Susi Moog commented on patch set 1 V +2 CR +2 04/26/19, 10:42

    Clean Backport, direct merge.
  4. Susi Moog merged patch set 2 04/26/19, 10:42