Review main Merged

56530[BUGFIX] Check date format before conversion in module "DB check"

Manuel Selbach CR +2 V +2 Normal +107 −7 updated 09/12/19, 05:59

Commit message

With the change in https://forge.typo3.org/issues/83675 every value could
be converted into a unix timestamp, which leads to incorrect conversions
in some cases e.g. if an interger value like a pid 5134 is passed to the
method.

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Frank Nägler +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Susi Moog +2
    • Frank Nägler +1
    • TYPO3com +1 CI

Issues 2

Files 2

Review log 4159

Show 2234 earlier messages
  1. Manuel Selbach uploaded patch set 1 04/03/18, 17:24

  2. TYPO3com voted on patch set 1 V +1 04/03/18, 17:33 Completed build in 08m 48s on Tue, 3 Apr, 07:33 PM Test Summary: 30935 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21939

  3. Manuel Selbach uploaded patch set 2 04/03/18, 18:05

  4. Oliver Klee commented on patch set 3 04/03/18, 18:12

    Published edit on patch set 2.
  5. Oliver Klee commented on patch set 3 04/03/18, 18:13

    Could we cover this with a unit test (or functional test) to make sure the change fixes the problem (and will continue to do so)?
  6. TYPO3com voted on patch set 2 V +1 04/03/18, 18:16 Completed build in 10m 11s on Tue, 3 Apr, 08:16 PM Test Summary: 30935 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21942

  7. TYPO3com voted on patch set 3 V +1 04/03/18, 18:21 Completed build in 09m 31s on Tue, 3 Apr, 08:21 PM Test Summary: 30935 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21944

  8. Manuel Selbach uploaded patch set 4 04/04/18, 18:36

  9. Manuel Selbach uploaded patch set 5 04/04/18, 18:39

  10. TYPO3com voted on patch set 4 V +1 04/04/18, 18:45 Completed build in 09m 04s on Wed, 4 Apr, 08:45 PM Test Summary: 30925 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22014

  11. TYPO3com voted on patch set 5 V +1 04/04/18, 18:48 Completed build in 08m 50s on Wed, 4 Apr, 08:48 PM Test Summary: 30925 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22015

  12. Kay Strobach commented on patch set 5 V +1 CR -1 04/19/18, 08:31

    QueryGenerator.php:1304

    as date will be soimply passed to DateTime date_create_from_format ( string $format , string $time [, DateTimeZone $timezone ] ) it would be usefull to check wether it is a string or not
  13. Manuel Selbach uploaded patch set 6 04/22/18, 11:05

  14. Manuel Selbach uploaded patch set 7 04/22/18, 11:10

  15. Manuel Selbach uploaded patch set 8 04/22/18, 11:15

  16. TYPO3com voted on patch set 6 V +1 04/22/18, 11:15 Completed build in 09m 36s on Sun, 22 Apr, 01:15 PM Test Summary: 31062 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22823

  17. Manuel Selbach uploaded patch set 9 04/22/18, 11:18

  18. TYPO3com voted on patch set 7 V +1 04/22/18, 11:21 Completed build in 10m 36s on Sun, 22 Apr, 01:21 PM Test Summary: 31062 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22824

  19. TYPO3com voted on patch set 8 V +1 04/22/18, 11:24 Completed build in 09m 03s on Sun, 22 Apr, 01:24 PM Test Summary: 31062 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22825

  20. TYPO3com voted on patch set 9 V +1 04/22/18, 11:28 Completed build in 10m 11s on Sun, 22 Apr, 01:28 PM Test Summary: 31062 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22826

  21. Oliver Klee commented on patch set 9 CR -1 04/22/18, 14:39

    QueryGenerator.php:1299

    According to the declaration, this should be string (or we need to remove the string type from the declaration if indeed other types are allowed).

    QueryGeneratorTest.php:72

    Which types can the parameters have?
  22. Manuel Selbach uploaded patch set 10 04/22/18, 18:36

  23. TYPO3com voted on patch set 10 V +1 04/22/18, 18:45 Completed build in 08m 40s on Sun, 22 Apr, 08:45 PM Test Summary: 31062 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-22835

  24. Mathias Brodala commented on patch set 10 05/14/18, 14:32

    QueryGenerator.php:1304

    I don't think we need this parameter. Also why not use \DateTime::ISO8601 instead?
  25. Manuel Selbach commented on patch set 10 05/15/18, 20:32

    QueryGenerator.php:1304 Reply

    I agree, we could remove the parameter. -> Should I, @Mathias Brodala? Please give me a ping then. Why not use \DateTime::ISO8601? -> The last test "ISO 8601 date string" will break then and this is what we get from the date picker. Additionally this constant is not compatible with the ISO 8601 standard: http://www.php.net/manual/en/class.datetime.php, but also \DateTime::ATOM does not fit here.
  26. Mathias Brodala commented on patch set 10 05/16/18, 08:35

    QueryGenerator.php:1304 Reply

    Yes, please remove the parameter and move the format to a local variable instead.
  27. Manuel Selbach uploaded patch set 12 05/16/18, 14:06

  28. TYPO3com voted on patch set 12 V +1 05/16/18, 14:13 Completed build in 07m 38s on Wed, 16 May, 04:13 PM Test Summary: 31163 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-23545

  29. Oliver Klee commented on patch set 13 05/16/18, 14:17

    Published edit on patch set 12.
  30. TYPO3com voted on patch set 13 V +1 05/16/18, 14:25 Completed build in 07m 52s on Wed, 16 May, 04:25 PM Test Summary: 31163 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-23546

  31. Manuel Selbach voted on patch set 13 CR +1 05/16/18, 20:28

  32. Mathias Brodala commented on patch set 13 05/17/18, 07:42

    > Patch Set 13: Code-Review+1 Normally it doesn't make sense to vote on your own change. ;-) Also there's a merge conflict which must be resolved first.
  33. Manuel Selbach uploaded patch set 14 05/17/18, 12:58

  34. Manuel Selbach commented on patch set 14 05/17/18, 13:01

    @Mathias Brodala -- Normally it doesn't make sense to vote on your own change. ;-) Shaggy would say: It wasn't me ;) Patch 13 was not uploaded by me and I just wanted to show, it's ok .
  1. TYPO3com voted on patch set 14 V +1 05/17/18, 13:06 Completed build in 07m 59s on Thu, 17 May, 03:06 PM Test Summary: 31241 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-23619

  2. Tymoteusz Motylewski commented on patch set 14 05/18/18, 20:38

    Can somebody provide a testing instructions here?
  3. Nicole Hummel commented on patch set 14 05/23/18, 13:44

    QueryGenerator.php:1276

    Not sure about this change. As far as I understand the documentation of strtotime() correctly, it is not necessarily a string like Y-m-d\\TH:i:s\\Z. You can even use "10 September 2000", "now", "+1 week 2 days 4 hours 2 seconds"

    QueryGenerator.php:1384

    !empty()
  4. Manuel Selbach rebased onto patch set 15 06/21/18, 09:17

  5. TYPO3com voted on patch set 15 V +1 06/21/18, 09:34 Completed build in 17m 32s on Thu, 21 Jun, 11:34 AM Test Summary: 32717 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-24576

  6. Benni Mack commented on patch set 15 10/29/18, 16:41

    hey, I can't get it working - I was using the DB check and looking for "uid" 123 but that didn't do anything with strtotime() without the patch.
  7. Benni Mack voted on patch set 15 V -1 10/29/18, 16:42

  8. Manuel Selbach commented on patch set 15 11/19/18, 21:59

    Did you try it with the example reported in the ticket: https://forge.typo3.org/issues/84588

    QueryGenerator.php:1276 Reply

    Yes, you're right, but in this case, it should only be checked whether the inputValue is of ISO-8601. This was previously tried by just converting it by strtotime(), but higher int values will be interpreted and bring back a timestamp even if you would like to use that int value. Thus it should be checked in a more strict way here. If you would like to see what's going on, I could show you the case in more details. Just give me a ping.
  9. Benni Mack updated the commit message in patch set 16 12/14/18, 10:11

  10. Benni Mack updated the commit message in patch set 17 03/24/19, 14:10

  11. TYPO3com voted on patch set 17 V +1 03/24/19, 14:25 Completed build in 14m 46s on Sun, 24 Mar, 03:25 PM Test Summary: 47232 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32922

  12. Sascha Egerer uploaded patch set 18 07/29/19, 13:45

  13. TYPO3com voted on patch set 18 V -1 07/29/19, 13:45 Completed build in 12s on Mon, 29 Jul, 03:45 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35365

  14. Sascha Egerer updated the commit message in patch set 19 07/29/19, 14:05

  15. TYPO3com voted on patch set 19 V -1 07/29/19, 14:06 Completed build in 16s on Mon, 29 Jul, 04:06 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35367

  16. Sascha Egerer uploaded patch set 20 07/29/19, 14:07

  17. TYPO3com voted on patch set 20 V +1 07/29/19, 14:17 Completed build in 09m 29s on Mon, 29 Jul, 04:17 PM Test Summary: 47181 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35368

  18. Ralph Brugger commented on patch set 20 07/29/19, 14:27

    I thought that I would be first of all necsary to check fot the type of the input field. If it is "Type = date,time" ((intval($conf['comparison']) >= 96 && intval($conf['comparison']) <= 105) then we should check or a valid date, but not check for a valid date, it the field is not from type date.
  19. Andreas Kienast voted on patch set 20 CR +1 08/08/19, 12:52

  20. Anja Leichsenring commented on patch set 20 08/24/19, 15:51

    I'd also opt for taking the comparison value into consideration. We know what we compare, so why wild guessing?
  21. Frank Nägler voted on patch set 20 V +1 CR +1 09/06/19, 11:46

  22. Anja Leichsenring wrote 09/09/19, 13:34

    Removed reviewer Anja Leichsenring.
  23. Susi Moog voted on patch set 20 V +2 CR +2 09/11/19, 11:43

  24. Susi Moog merged patch set 21 09/11/19, 11:45

  25. Andreas Kienast commented on patch set 21 09/12/19, 05:59

    This change breaks a nightly test on mssql: https://bamboo.typo3.com/browse/CORE-GTN-FMS0PHP7307-924