Review main Merged

30526[BUGFIX] Guard FAL API when called with invalid identifiers

Helmut Hummel CR +2 V +2 Easy +9 −1 updated 06/11/14, 09:50

Commit message

When calling ResourceFactory::getInstance()
->getFileObjectFromCombinedIdentifier($identifier)
with $identifier === NULL or $identifier === ''
an index entry is written for storage 0 which contains the
last path segment of PATH_site as identifier.

Guard the API in two places by throwing exceptions
when an invalid file identifier is given.

Review

  • Code review CR +2
    • Steffen Ritter +2
    • Fabien Udriot +1
  • Verified V +2
    • Steffen Ritter +2
    • Fabien Udriot +1

Issues 1

Files 3

Review log 13

  1. Helmut Hummel uploaded patch set 2 06/02/14, 18:22

  2. Helmut Hummel uploaded patch set 3 06/02/14, 18:23

  3. Helmut Hummel commented on patch set 3 06/02/14, 18:24

    LocalDriver.php:270

    Needs to be checked how this behaves with symlinks!
  4. Mr. Jenkins commented on patch set 1 CR -1 V -1 06/02/14, 18:35

  5. Mr. Jenkins commented on patch set 2 CR -1 V -1 06/02/14, 18:36

  6. Mr. Jenkins commented on patch set 3 CR -1 V -1 06/02/14, 18:49

  7. Markus Klein commented on patch set 3 06/02/14, 19:26

    LocalDriver.php:270 Reply

    doesn't it suffice to use only is_file then?

    ResourceFactory.php:382

    are these two variables checked in getFileObjectByStorageAndIdentifier() then?
  8. Krzysztof Adamczyk uploaded patch set 4 06/11/14, 06:54

  9. Mr. Jenkins commented on patch set 4 06/11/14, 07:07

  10. Steffen Ritter voted on patch set 4 V +1 CR +1 06/11/14, 09:00

  11. Fabien Udriot voted on patch set 4 V +1 CR +1 06/11/14, 09:31

  12. Steffen Ritter voted on patch set 4 V +2 CR +2 06/11/14, 09:50

  13. Steffen Ritter merged patch set 5 06/11/14, 09:50