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

Review and fix incorrect strpos() @ lib/filelib.php

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.4.5, 3.5.2, 3.6
    • None
    • Files API
    • None
    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE

    Description

      Discovered when playing with PHP 7.3 @ MDL-63420, there is a wrong strpos() use in lib/filelib.php

      $pos = strpos('/', $current, 8);

      It needs to be reviewed, surely params are swapped and there is an attempt to ignore the first protocol chars or something like that.

      Ciao

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stronk7 Eloy Lafuente (stronk7)
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: