Moodle
  1. Moodle
  2. MDL-22154

Flash detection is made on every page load with AJAX call to environment.php script (meant be done only once per session)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.8
    • Fix Version/s: 1.9.9
    • Component/s: General, Performance
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      26652

      Description

      Flash detection is done with AJAX call to login/environment.php script. It is meant to be done only once per login session, but because of incorrect usage of HTML entity, it is done on every page load.

      This can be fixed simply by replacing '&' entity with single '&' in AJAX GET URL:

       
      Index: lib/weblib.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
      retrieving revision 1.970.2.167
      diff -r1.970.2.167 weblib.php
      2524c2524
      <            "  YAHOO.util.Connect.asyncRequest('GET','".$CFG->httpswwwroot."/login/environment.php?sesskey=".sesskey()."&amp;flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release);\n".
      ---
      >            "  YAHOO.util.Connect.asyncRequest('GET','".$CFG->httpswwwroot."/login/environment.php?sesskey=".sesskey()."&flashversion='+flashversion.major+'.'+flashversion.minor+'.'+flashversion.release);\n".
      

        Activity

        Hide
        Petr Škoda added a comment -

        fix committed, I added CDATA to make it xhtml strict,
        thanks a lot for your report!

        Show
        Petr Škoda added a comment - fix committed, I added CDATA to make it xhtml strict, thanks a lot for your report!
        Hide
        Pasi Häkkinen added a comment -

        Whoa, that was quick!

        Show
        Pasi Häkkinen added a comment - Whoa, that was quick!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: