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

Verify uses of deprecated FILTER_SANITIZE_(STRING|STRIPPED)

XMLWordPrintable

    • 2
    • Team Hedgehog Sprint 1 review
    • Small

      In php81 these have been deprecated:

      The FILTER_SANITIZE_STRING and FILTER_SANITIZE_STRIPPED filters have been
      deprecated.
      RFC: https://wiki.php.net/rfc/deprecations_php_8_1

      And we have a few in core:

      $ ag 'FILTER_SANITIZE_(STRING|STRIPPED)'
      lib/horde/framework/Horde/Variables.php
      338:            ? filter_var_array($val, FILTER_SANITIZE_STRING)
      339:            : filter_var($val, FILTER_SANITIZE_STRING);
       
      h5p/h5plib/v124/joubel/editor/h5peditor-file.class.php
      17:    $field = filter_input(INPUT_POST, 'field', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);
      

      This is about to check if they are reachable or no, and remove/replace them, not sure if using conditional code based on the php version...

      Ciao

            david.woloszyn@moodle.com David Woloszyn
            stronk7 Eloy Lafuente (stronk7)
            Safat Shahin Safat Shahin
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 46 minutes
                6h 46m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.