Username character limit preventing login via SAML
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon | ||
1.10 |
Fix Released
|
High
|
Robert Lyon | ||
1.9 |
Fix Released
|
High
|
Robert Lyon | ||
15.04 |
Fix Released
|
High
|
Robert Lyon |
Bug Description
Mahara version15.04.1
This report is in relation to my earlier forum post https:/
Issue:
User is logging in via SAML and the user is being auto-created on first login.
Remote username is a unique id (example: 51c717bc-
When the user tries subsequent logins they are rejected with a error message that the user already exists and cannot be created.
Reason:
When the user is auto-created only the first 30 characters of the unique id are stored in the username field so the user is not recognised as being on the system when cheaked agains the full username from the login.
The system then tries to auto-create the user, which fails because the full unique id is stored in the 'auth_remote_user' table.
Solution:
Changing $maxlen from 30 to 40 in function get_new_username() of user.php populates the user name with the full unique id.
Maybe this could be a configurable option?
no longer affects: | mahara/trunk |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
no longer affects: | mahara/15.10 |
Patch for "master" branch: https:/ /reviews. mahara. org/5160