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

CAS Authentication : Undefined index: QUERY_STRING when executing cron

    Details

    • Testing Instructions:
      Hide
      • Enable CAS Authentication in the site administration
      • Run the cron from cli
      • There should be no "Undefined index: QUERY_STRING " error displayed
      • Addionnal validation : Be sure that you can still connect with CAS and that there's no error in the process
      Show
      Enable CAS Authentication in the site administration Run the cron from cli There should be no "Undefined index: QUERY_STRING " error displayed Addionnal validation : Be sure that you can still connect with CAS and that there's no error in the process
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
      git@github.com:StudiUM/moodle.git
    • Pull Master Branch:
      MDL-38637-master

      Description

      There's an "Undefined index: QUERY_STRING" error when you run the cron and that the CAS Authentication is enabled.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting that and providing a fix.

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting that and providing a fix.
            Hide
            phalacee Jason Fowler added a comment - - edited

            Can I recommend a change to the patch, just to make it cleaner:

            $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
            if (isset($_SERVER['QUERY_STRING'])) { {
                $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
            } 
            

            Show
            phalacee Jason Fowler added a comment - - edited Can I recommend a change to the patch, just to make it cleaner: $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; if (isset($_SERVER['QUERY_STRING'])) { { $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; }
            Hide
            gaudreaj Jean-Philippe Gaudreau added a comment -

            Hi Jason,

            You're totally right! Thx!

            Putting back to peer review.

            Show
            gaudreaj Jean-Philippe Gaudreau added a comment - Hi Jason, You're totally right! Thx! Putting back to peer review.
            Hide
            phalacee Jason Fowler added a comment -

            Much better, thank you. Pushing for integration now.

            Show
            phalacee Jason Fowler added a comment - Much better, thank you. Pushing for integration now.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master, 24 and 23 - thanks Jean-Philippe

            Show
            poltawski Dan Poltawski added a comment - Integrated to master, 24 and 23 - thanks Jean-Philippe
            Hide
            dmonllao David Monllaó added a comment -

            Hi Rossie, there is a VM in the shared folder ready to test this kind of issues

            Show
            dmonllao David Monllaó added a comment - Hi Rossie, there is a VM in the shared folder ready to test this kind of issues
            Hide
            rwijaya Rossiani Wijaya added a comment -

            This is working as expected.

            Tested for 2.3, 2.4 and master

            Test passed.

            Show
            rwijaya Rossiani Wijaya added a comment - This is working as expected. Tested for 2.3, 2.4 and master Test passed.
            Hide
            poltawski Dan Poltawski added a comment -

            Blooming Marvelous! It's time for a knees up - your changes are upstream!

            Thanks for making Moodle better!

            Toodle pip

            Show
            poltawski Dan Poltawski added a comment - Blooming Marvelous! It's time for a knees up - your changes are upstream! Thanks for making Moodle better! Toodle pip

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/13