Save remote username in auth_remote_user in lowercase

Bug #1945699 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Medium
Unassigned

Bug Description

The remoteusername should be saved in lowercase and checked case-insensitive like we do with the username and email address in the usr table.

See https://mahara.org/interaction/forum/topic.php?id=8898 for the background.

Main part:

The problem seems to be related to the checking of the remote username.

Eg, if we have a person with username = 'test01' and we have a row in the auth_remote_user table where remoteusername = 'test01' and the authinstance matches the one in the usr table things work fine

But if we have a person with username = 'test01' and we have a row in the auth_remote_user table where remoteusername = 'test01' and the authinstance matches the one in the usr table and another row in the auth_remote_user table where remoteusername = 'Test01' then things break.
We get ERROR: more than one row returned by a subquery used as an expression

The problem is the SQL query checks on the remoteusername by converting it to lowercase first.

We should be saving remoteusername either as lowercase only or checking before saving that there is only one of any case.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.