Review main Abandoned

85332[BUGFIX] Inconsistent behavior in MathUtility::canBeInterpretedAsInteger boolean values

Krystian Chanek CR -2 V -1 Easy +5 −4 updated 10/23/25, 14:09

Commit message

Earlier bool - false value wasn't correct in the method canBeInterpretedAsInteger. I changed it to accept this value as correct and changed validation in the method to check, if our var is bool too. Now we accept bool var as a valid integer value.

Review

  • Code review CR -2
    • Stefan Bürk -2
    • Benjamin Franzke -1
  • Verified V -1
    • core-ci -1 CI

Issues 1

Files 2

Review log 912

  1. Krystian Chanek uploaded patch set 1 07/23/24, 06:59

  2. core-ci voted on patch set 1 V -1 07/23/24, 07:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61992

  3. Andreas Kienast updated the commit message in patch set 2 V -1 07/24/24, 07:03

  4. Andreas Kienast commented on patch set 2 CR -1 07/24/24, 07:04

    Please explain in your commit message what has been solved.
  5. core-ci voted on patch set 2 V -1 07/24/24, 07:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62072

  6. Krystian Chanek updated the commit message in patch set 3 CR -1 V -1 07/24/24, 08:53

  7. Krystian Chanek commented on patch set 3 07/24/24, 08:55

    Reply

    Added a message with explanation.
  8. core-ci voted on patch set 3 V -1 07/24/24, 09:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/62078

  9. Benjamin Franzke commented on patch set 3 CR -1 10/10/24, 16:30

    The method `canBeInterpretedAsInteger` is not meant to be a loose-check, it is actually used in some cases to prevent security issues and validate input E.g. it is mean to fail for "00", therefore we should not evaluate `true` or `false` as integer either. Better be conservative here.
  10. Stefan Bürk commented on patch set 3 CR -2 10/23/25, 14:08

    Reply

    I can understand the intention from @krystian.chanek@o2.pl and thought about that inconsisty also in the past, like described in the linked issue, I align here with @ben@bnf.dev on that. Beside that `bugfixes` are breaking by nature or changing behaviour (aka `it's not a bug it's a feature`) the behaviour of this method is a long standing one and developers all over the place has worked and expecting this behaviour and changing this would fail a lot of projects or introducing cumbersome behaviour, if not security risks like already mentioned. Rejected the linked issue now and going to abandon this change.
  11. Stefan Bürk commented on patch set 3 10/23/25, 14:09

    Reply

    Done