Issue Details (XML | Word | Printable)

Key: MDL-7410
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: adam
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

LDAP auth fails when username includes special chars

Created: 09/Nov/06 01:59 PM   Updated: 01/Mar/07 07:11 PM
Return to search
Component/s: Authentication
Affects Version/s: 1.6.2
Fix Version/s: 1.8, 1.9

Issue Links:
Dependency
 

Participants: adam and Petr Skoda
Security Level: None
Resolved date: 01/Mar/07
Affected Branches: MOODLE_16_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
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 );


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 21/Feb/07 12:43 AM
Field Original Value New Value
Link This issue will be resolved by MDL-8590 [ MDL-8590 ]
Petr Skoda made changes - 01/Mar/07 07:11 PM
Fix Version/s 1.9 [ 10190 ]
Fix Version/s 1.8 [ 10130 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Assignee Martin Dougiamas [ dougiamas ] Petr ?koda [ skodak ]