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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.5, 3.5.2, 3.6
    • Fix Version/s: None
    • Component/s: Files API
    • Labels:
      None
    • Affected Branches:
      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

              • Assignee:
                Unassigned
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Matteo Scaramuccia, Jake Dallimore, Jun Pataleta, Ryan Wyllie
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: