?
avatar mdaoudi123
mdaoudi123
5 Mar 2019

I installed an instance of JOOMLA on a POSTGRES database and I noticed that the email address of the users is case sensitive.
The problem is that you can create two users with the same address.
Example:
user 1: test@test.fr
User 2: Test@test.fr

Normally the verification of the email address must be insensitive box.
Indeed I noticed that in the methods of checking the email addresses in the core of joomla, do not handle this case.

To solve the problem, waiting for a patch, I had to change the type of the mail fields in the table #__users from VARCHAR to CITEXT.

Could you make this fix in the next version / patch of Joomla.

Informations:

Joomla version: 3.9.2 (installed on Postgres) and not on Mysql
Postgres version: 10
PHP version: 7.2

thank you in advance

avatar mdaoudi123 mdaoudi123 - open - 5 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2019

Please give "System information (as much as possible)"

avatar mdaoudi123
mdaoudi123 - comment - 5 Mar 2019

Hi,
First thanks for responding.
Joomla version 3.9.2 (installed on Postgres) and not on Mysql
Postgres version 10
PHP version 7.2

that's all

Need more informations?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2019

as 3.9: @HLeithner can you please comment?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2019

@mdaoudi123 can you please append the Information in first Comment so they don't have to be searched by Volunteers?

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Mar 2019
Status New Discussion
avatar HLeithner
HLeithner - comment - 5 Mar 2019

@alikon can you look at this?

avatar mdaoudi123 mdaoudi123 - change - 5 Mar 2019
The description was changed
avatar mdaoudi123 mdaoudi123 - edited - 5 Mar 2019
avatar mdaoudi123
mdaoudi123 - comment - 5 Mar 2019

Thanks

avatar alikon
alikon - comment - 5 Mar 2019

i don't think we can use CITEXT on the 3.x branch cause of Unsupported versions: 9.3 / 9.2 / 9.1 / 9.0 / 8.4
and joomla 3.x still support 8.3.18 as minimum requirement we should use something like

SELECT id FROM #__users WHERE lower(email) = LOWER(email);

and for performance maybe change the index too

ALTER TABLE #__users DROP INDEX email;
CREATE INDEX email ON #__users (LOWER(email));
avatar mdaoudi123
mdaoudi123 - comment - 6 Mar 2019

Hello,
Thanks for responding.

In the begining i tried to use the "LOWER" function to compare the email, but i found a lot of function that use this comparaison. So i was obliged to change all the function into many files and I was afraid to forget others. so i choose this simpliest solution: "CITEXT".

I think that we have to create a new patch where we the function "LOWER" will be used for every email comparaison. do you agree with me @alikon ?

regards

avatar alikon
alikon - comment - 6 Mar 2019

@mdaoudi123 yes, are you going to submit a pr ?

avatar mdaoudi123
mdaoudi123 - comment - 7 Mar 2019

Hello,

I dont know how to do it.
Could you please tell me how? or do it in my place?

Thanks
@alikon

avatar alikon
alikon - comment - 7 Mar 2019

ok then please test this draft pr #24117

avatar joomla-cms-bot joomla-cms-bot - change - 7 Mar 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-03-07 18:30:35
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 7 Mar 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Mar 2019
Closed_Date 2019-03-07 18:30:35 2019-03-07 18:30:36
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 7 Mar 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 7 Mar 2019

closed as having Pull Request #24117

avatar mdaoudi123
mdaoudi123 - comment - 8 Mar 2019

Thanks a lot for your help.

But There is also another file where exists a email comparaison:

  • components/com_users/models/reset.php => function processResetConfirm
  • components/com_users/models/remind.php => function processRemindRequest
  • ...
    and into other files..... (search for "$db->quoteName('email')")

Could you please add the correction to thoses files @alikon

avatar alikon
alikon - comment - 8 Mar 2019

yes for sure, i was in hurry yesterday and made a draft pr only
please @mdaoudi123 comment on #24117

avatar mdaoudi123
mdaoudi123 - comment - 8 Mar 2019

already done. thanks for responding

Add a Comment

Login with GitHub to post a comment