Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User name and email existence checks use zauth tables #3256

Closed
Guite opened this issue Dec 3, 2016 · 4 comments
Closed

User name and email existence checks use zauth tables #3256

Guite opened this issue Dec 3, 2016 · 4 comments
Assignees
Milestone

Comments

@Guite
Copy link
Member

Guite commented Dec 3, 2016

Q A
Zikula Version 1.4.4
PHP Version 5.5

Expected behavior

A username (or an email address if unique emails are configured) may not be registered twice.

Actual behavior

User name and email address checking is done using the zauth authentication mapping and verification tables. But existing users are only migrated during their (next) login after ZAuth has been installed. Hence, it is possible to register using an already existing user name if the corresponding user is not contained in the zauth tables yet.

Steps to reproduce

Try to register using a user name which exists in the user table, but not in mapping table yet.

Proposal

Either enforce a migration of all users to the mapping and verification tables. Or check user name and email address existence using the users table.

@Guite Guite added this to the 1.4.4 milestone Dec 3, 2016
@Guite Guite changed the title All users need zauth migration User name existence check uses zauth mapping table Dec 3, 2016
@rallek
Copy link
Contributor

rallek commented Dec 3, 2016

If the user who never logged in since the upgrade happens is asking for his email recovery he do get the info his email address is not available. Recovery not possible.

@Guite Guite changed the title User name existence check uses zauth mapping table User name and email existence checks use zauth tables Dec 3, 2016
@craigh
Copy link
Member

craigh commented Dec 3, 2016

Either enforce a migration of all users to the mapping and verification tables. Or check user name and email address existence using the users table

actually - checking username and/or email address can (and probably should) only be done in the users table.

@craigh
Copy link
Member

craigh commented Dec 4, 2016

valid uname appears to be checked in both users repo and zauth mapping repo:

public function validate($authenticationMappingEntity, Constraint $constraint)

public function validate($data, Constraint $constraint)

@rallek
Copy link
Contributor

rallek commented Dec 4, 2016

I just tried the situation and confirm the problem.

My clone of 1.4.1 was working before upgrading. There is a user registered. If now upgrade to 1.4.4rc2/3 I am able to create a new user with the same name but new mail address. The registration was made as a guest and not as the admin.

The registration process was complete successfull and the new user is able to login via email/password.

Can I help with anything to test/analyse/log?

I will keep this test environment running and do other tests in a new setup.

craigh added a commit that referenced this issue Dec 4, 2016
Guite pushed a commit that referenced this issue Dec 4, 2016
* validate UserEntity on registration.

fixes #3256

* fixed recognition of existing user names

* added missing flashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants