Review main Merged

20875[BUGFIX] uploading extname_1.0.3 (1).zip creates extension "extname (1)"

Philipp Gampe CR +2 V +2 Normal +88 −3 updated 06/03/13, 20:49

Commit message

The function getExtensionFromZipFile fails to sanitize any output after
the version. As the function is only interested in the part before the
version which must be the extension key, remove any trailing characters.

Add a unit test to document this behavior.

Review

  • Code review CR +2
    • Wouter Wolters +2
    • Dmitry Dulepov +2
    • Alexander Opitz +1
  • Verified V +2
    • Wouter Wolters +2
    • Dmitry Dulepov +2

Issues 1

Files 2

Review log 13

  1. Philipp Gampe uploaded patch set 2 05/26/13, 17:32

    UploadExtensionFileController.php:161 Reply

    no, extension keys might have underscores
  2. Mr. Jenkins commented on patch set 1 05/26/13, 17:32

  3. Mr. Jenkins commented on patch set 2 05/26/13, 17:32

  4. Wouter Wolters uploaded patch set 3 05/26/13, 17:32

  5. Dmitry Dulepov commented on patch set 4 V 0 05/26/13, 17:32

    by team member; Looks good to me, approved
  6. Alexander Opitz commented on patch set 4 05/26/13, 17:32

    (1 inline comment)

    UploadExtensionFileController.php:161

    Isn't it easier to substr to the first occurrence of an underscore from the strtolower($fileName)?
  7. Alexander Opitz commented on patch set 4 1 comment 05/26/13, 17:32

    Looks good to me, but someone else must approve
  8. Philipp Gampe commented on patch set 4 05/26/13, 17:32

    (1 inline comment)
  9. Mr. Jenkins commented on patch set 4 05/26/13, 17:32

  10. Wouter Wolters uploaded patch set 4 05/26/13, 17:32

  11. Wouter Wolters commented on patch set 4 05/26/13, 17:32

    Verified; Looks good to me, but someone else must approve Added one more test. Windows is putting the extra parts without a space.
  12. Wouter Wolters commented on patch set 4 V 0 05/26/13, 17:32

    by team member; Looks good to me, approved
  13. Wouter Wolters merged patch set 5 05/26/13, 17:32