
When an user enters his email address with different capitals to reset the password the email address is not found.
- Create user: Test@example.com
- Reset password with Test@example.com --> user is found and email is sent to user
- Reset password with test@example.com --> user is not found and no email is sent to user
Comment | File | Size | Author |
---|---|---|---|
#10 | Password_reset_form_is_case_sensitive_for_email_address-2616264-10.patch | 2.5 KB | thedut |
Comments
Comment #2
Danny.Wouters CreditAttribution: Danny.Wouters at ezCompany commentedThis patch enables an user to enter his email address case insensitive when requesting a new password.
Comment #3
thedut CreditAttribution: thedut commentedHello Danny.Wouters,
Nice catch ! Thanks a lot for providing a patch to.
I need time to test this but I guess this patch is not the right one : the
expression should not be checked here.
And I need to check if the patch should handle specific stuff about compatibility with Email registration and login tobogan modules.
Comment #4
thedut CreditAttribution: thedut commentedOk Here is the right patch.
I have added new simpleTests for sending email in case of lost password.
Comment #6
thedut CreditAttribution: thedut commentedFixed into the dbee module v7.x-2.3.
Thank you Danny.Wouters for reporting this issue.
Note :
the v6x version meets this bug to. A patch for the D6 version is needed.The v6x version does not meet this issue.
This issue only concerned users with sensitive case email, trying to reset their password. As a workaround for previous versions those users could succeed in reseting their password providing their username ou their exact sensitive case email.
Comment #7
Danny.Wouters CreditAttribution: Danny.Wouters at ezCompany commentedHello thedut, thank you for your fast response.
I installed the new version of the module and I am able to request a new password.
However I receive the following notice when I request a new password
Do you have an idea what it is causing this notice?
I also have a suggestion for a possible improvement of the new tests. In the tests an email address is generated with the function randomName(). Maybe you could use a fixed name (e.g. Test@example.com) instead of generating a random string. When you use a fixed name you are sure of the capitalization of the email address.
Comment #8
spadxiii CreditAttribution: spadxiii at ezCompany commentedExtra note to the above comment (#7): the notice might be caused by the fact that dbee_extract unsets the dbee_*-fields, which are checked when doing the user_load_multiple-call.
ps. when using randomName, you can't be certain the name/email contains upper and lower case characters :)
Comment #9
thedut CreditAttribution: thedut commentedOups, I have released this commit to early.
Not so big deal, it's only an Notice error. I change the priority of this issue to "Minor".
According to your advises, I'm going to update the tests, making absolutly sure the tested random name will contain both uppercase and lowercase characters.
For the record : In a perfect world, the form for reseting the password should not need be altered from the dbee module. The dbee_query_alter() function should take care of matching datas regarding the encryption. Unfornatelly, the User core functions may need some fixes. The User_load_multiple function does not handle natively sensitive case emails but thanks to MySQL collation (where is it set ??), it succeed to load a user from a sensitive case email (see this post and its answer). This behavior corresponds to an opened issue for postgreSQL.
In the future, depending on changes on the user load core function, the changes on the reseting password form in the dbee module may be deleted.
Comment #10
thedut CreditAttribution: thedut commentedI am not able to reproduce the notice error : Notice: Undefined property: stdClass::$dbee_mail in DrupalDefaultEntityController->cacheGet() (line 414 of /includes/entity.inc).
It would help me if you provide the whole backtrace ("called fom etc..., called from etc...").
I provide here a new patch, that handle the sensitive case email issue, replicating the MySQL collation (I am not altering the user_pass_form anymore).
Tell me if the new patch fixes the notice error please.
Comment #12
Danny.Wouters CreditAttribution: Danny.Wouters at ezCompany commentedThank you for the new patch.
The notice no longer appears when I request a new password.
Comment #13
thedut CreditAttribution: thedut commentedFixed into the dbee module v7.x-2.4.
Thank you Danny.Wouters and SpadXIII for your help.
Comment #14
thedut CreditAttribution: thedut commented