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

LDAP auth fails when username includes special chars

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.8, 1.9
    • Component/s: Authentication
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      This bug is essentially the same as MDL-3992 but concerns the username not the password.

      To summarise: LDAP authentication fails for users with quotes (') or other special charactors in their usernames.

      Like bug MDL-3992 a solution is to add a stripslashes() call.

      In auth_user_login() in auth/ldap/lib.php after the check for blank username || password add the following:
      $username = stripslashes( $username );

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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