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

Extra utf decoding in external DB (patch included)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.8
    • Component/s: Authentication
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Extra utf decoding in external DB. It damage firstname etc.

      Maybe should we check encoding here?

      Index: auth/db/lib.php

      ===================================================================

      RCS file: /cvsroot/moodle/moodle/auth/db/lib.php,v

      retrieving revision 1.15.2.2

      diff -u -r1.15.2.2 lib.php

      — auth/db/lib.php 31 Aug 2005 05:59:31 -0000 1.15.2.2

      +++ auth/db/lib.php 21 Apr 2006 10:04:24 -0000

      @@ -76,7 +76,7 @@

      if ($rs = $authdb->Execute(SELECT .$pcfg[field_map_$field]. FROM $CFG->auth_dbtable

      WHERE $CFG->auth_dbfielduser = '$username')) {

      if ( $rs->RecordCount() == 1 )

      { - $result[$field] = addslashes(stripslashes(utf8_decode($rs->fields[0]))); + $result[$field] = addslashes(stripslashes($rs->fields[0])); //dlnsk (extra utf8_decode removed) }

      }

      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              dlnsk Dmitry Pupinin
              Tester:
              Nobody Nobody
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07