Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67316

Fix known cases of invalid chars on base convert functions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.8, 3.9
    • Fix Version/s: 3.8.3
    • Component/s: General
    • Labels:

      Description

      . Passing invalid characters to ''base_convert()'', ''bindec()'', ''octdec()''
      and ''hexdec()'' will now generate a deprecation notice. The result will
      still be computed as if the invalid characters did not exist. Leading and
      trailing whitespace, as well as prefixes of type 0x (depending on base)
      continue to be allowed.

      It's not possible to find programmatically these cases. So all we can do is to fix those we are aware about (automated + manual testing).

      Whenever more cases are detected, they will need to be fixed. In any case, code will continue working the same, because the behavior (ignore incorrect chars) has not changed.

      Example: https://3v4l.org/mrfun

      Fixes here have to go both to 38_STABLE and master (part of the php74 epic).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Carlos Escobedo
              Integrator:
              Andrew Nicols
              Tester:
              CiBoT
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 25 minutes
                  2h 25m