Review main Merged

59033[BUGFIX] Accept Unicode characters in email spam protection

Oli Bartsch CR +2 V +2 Normal +50 −8 updated 12/10/18, 09:30

Commit message

Use multibyte handling to properly process all Unicode characters for
the spam protection email address handling.

Review

  • Code review CR +2
    • Markus Klein +2
    • Josef Glatz +1
    • Wittkiel Gruppe +1
  • Verified V +2
    • Markus Klein +2
    • Josef Glatz +1
    • Joerg Kummer +1
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 3037

Show 812 earlier messages
  1. Oli Bartsch uploaded patch set 1 12/04/18, 22:51

  2. TYPO3com voted on patch set 1 V -1 12/04/18, 23:04 Completed build in 12m 06s on Wed, 5 Dec, 12:04 AM Test Summary: 4 of 48960 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30452

  3. Oli Bartsch updated the commit message in patch set 2 12/04/18, 23:33

  4. Oli Bartsch uploaded patch set 3 12/04/18, 23:36

  5. TYPO3com voted on patch set 2 V -1 12/04/18, 23:47 Completed build in 13m 12s on Wed, 5 Dec, 12:47 AM Test Summary: 4 of 48960 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30453

  6. TYPO3com voted on patch set 3 V +1 12/04/18, 23:49 Completed build in 12m 59s on Wed, 5 Dec, 12:49 AM Test Summary: 48548 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30454

  7. Markus Klein commented on patch set 3 12/05/18, 00:26

    ContentObjectRenderer.php:5748

    I'm not really amused with this solution. The loop reads like an endless loop and "may" only be stopped by some other function that does variable manipulation via parameter by reference.
  8. Josef Glatz commented on patch set 3 12/05/18, 05:36

    Please check your commit message for typo's
  9. Oli Bartsch commented on patch set 3 12/05/18, 08:19

    > Patch Set 3: > > (1 comment) Thanks for the hint. I'll change that with the next functional patch set.
  10. Raphael Graf commented on patch set 3 12/05/18, 19:41

    ContentObjectRenderer.php:7487

    The strlen will recalculate the (same) length in a loop. I'd use something like: if(!isset($string[$offset])) (Functions like mb_ord and mb_strlen do exist, but using them may be slow)
  11. Oli Bartsch uploaded patch set 4 12/05/18, 20:19

  12. TYPO3com voted on patch set 4 V +1 12/05/18, 20:29 Completed build in 10m 32s on Wed, 5 Dec, 09:29 PM Test Summary: 48548 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30469

  1. Oli Bartsch commented on patch set 4 12/05/18, 20:32

    ContentObjectRenderer.php:5748 Reply

    Yes you are totally right with this demur. One won't see the break condition on the first look. So as this patch is for master with PHP > 7.2 I think we should just go with mb_ord. So the custom method isn't needed anymore.

    ContentObjectRenderer.php:7487 Reply

    Yes I share this demur. Like I replied to Markus Klein, this patch is for master with PHP > 7.2 so this custom method is just not needed at all because of the multibyte function.
  2. Raphael Graf commented on patch set 4 CR +1 12/05/18, 20:59

    ContentObjectRenderer.php:5746

    Sadly, preg_split looks like the best option..
  3. Joerg Kummer voted on patch set 4 V +1 12/05/18, 21:21

  4. Markus Klein commented on patch set 4 12/06/18, 09:55

    ContentObjectRenderer.php:5746

    what about simply using the mb_* versions of those functions? mb_strlen() mb_substr() mb_ord()
  5. Josef Glatz commented on patch set 4 12/06/18, 09:56

    still some typos.
  6. Mathias Brodala updated the commit message in patch set 5 12/06/18, 10:00

  7. Markus Klein commented on patch set 5 12/06/18, 10:07

    comments from set 4 still apply
  8. TYPO3com voted on patch set 5 V +1 12/06/18, 10:12 Completed build in 11m 26s on Thu, 6 Dec, 11:12 AM Test Summary: 48548 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30472

  9. Joerg Kummer voted on patch set 5 V +1 12/06/18, 10:48

  10. Oli Bartsch commented on patch set 5 12/06/18, 11:02

    ContentObjectRenderer.php:5746 Reply

    I think it's better to delegate low-level logic to the parser. It also reduces the code complexity. Furthermore preg_split is often faster than manually parsing strings. What's your take on this?

    ContentObjectRenderer.php:5746 Reply

    Done
  11. Markus Klein commented on patch set 5 12/06/18, 14:07

    Okay. So far so good. Still this patch qualifies for unit tests a lot. I want that documented why we run a preg_* stuff here. Tests with possible inputs and outputs fit best here, I would say.
  12. Oli Bartsch uploaded patch set 6 12/09/18, 17:09

  13. TYPO3com voted on patch set 6 V +1 12/09/18, 17:24 Completed build in 14m 15s on Sun, 9 Dec, 06:24 PM Test Summary: 48732 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30555

  14. Oli Bartsch commented on patch set 6 12/09/18, 17:24

    > Uploaded patch set 6. Added Unit Test which checks explicit the use of the multibyte handling. This is a first try for me so I'm really looking forward to your feedback.
  15. Markus Klein commented on patch set 6 12/09/18, 19:58

    Well done! Just a minor nitpick.

    ContentObjectRendererTest.php:8254

    for readability I would swap those two
  16. Joerg Kummer voted on patch set 6 V +1 12/09/18, 20:31

  17. Oli Bartsch uploaded patch set 7 12/09/18, 21:51

  18. TYPO3com voted on patch set 7 V +1 12/09/18, 22:01 Completed build in 09m 54s on Sun, 9 Dec, 11:01 PM Test Summary: 48732 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30563

  19. Oli Bartsch commented on patch set 7 12/09/18, 22:12

    > Patch Set 6: > > (1 comment) > > Well done! Just a minor nitpick. Thank you! Uploaded a new patch set for that.

    ContentObjectRendererTest.php:8254 Reply

    Yes, I swapped them.
  20. Markus Klein voted on patch set 7 V +1 CR +1 12/09/18, 22:27

  21. Joerg Kummer voted on patch set 7 V +1 12/09/18, 23:39

  22. Josef Glatz voted on patch set 7 V +1 CR +1 12/10/18, 04:03

  23. Wittkiel Gruppe voted on patch set 7 CR +1 12/10/18, 09:22

  24. Markus Klein voted on patch set 7 V +2 CR +2 12/10/18, 09:30

  25. Markus Klein merged patch set 8 12/10/18, 09:30