Moodle

LDAP auth fails when username includes special chars

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor 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 );

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

this should be fixed in latest 1.8dev cvs, please test it and report any problems, thanks!

Show
Petr Škoda (skodak) added a comment - this should be fixed in latest 1.8dev cvs, please test it and report any problems, thanks!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: