View Issue Details

This issue affects 1 person(s).
 16
IDProjectCategoryView StatusLast Update
18257Bug reportsUser / Groups / Rolespublic2026-05-20 12:56
ReporterAdrianR Assigned To 
PrioritynoneSeverityminor 
Status feedbackResolutionopen 
Product Version5.3.x 
Summary18257: Multiple users with same email address
Description

When a new user is added, the same email address as an existing one can be added.

Steps To Reproduce

Steps to reproduce

Create two accounts with different account name but same email address

Expected result

A warning that this email is already in use and stop user creating process (don't run user create php form)

Actual result

Both users are created with the same email address.

TagsNo tags attached.
Bug heat16
Complete LimeSurvey version number (& build)5.3.26+220720
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL 5.7.38
Server OS (if known)CentOS Stream 8
Webserver software & version (if known)Apache 2.4
PHP Version7.4

Relationships

related to 19237 feedbacktibor.pacalat User should not be able to change their email to an existing one 

Users monitoring this issue

There are no users monitoring this issue.

Activities

ollehar

ollehar

2022-07-19 10:35

reporter   ~71007

Should probably have a unique constraint in the database, or at least active record validation rules.

tpartner

tpartner

2022-07-19 11:58

partner   ~71009

Last edited: 2022-07-19 12:00

I'm not sure I see it as a bug. I regularly add test users or add users where I want the password automatically created but not sent to the user by LimeSurvey so I use my email address.

Or maybe just a warning?

ollehar

ollehar

2022-07-19 12:00

reporter   ~71010

It's not about sending out emails, but having the email address being unique for each user.

tpartner

tpartner

2022-07-19 12:01

partner   ~71011

I understand that. I have expanded my comment slightly.

gabrieljenik

gabrieljenik

2022-07-19 20:02

manager   ~71020

I am not sure this is a minor thing, as the "minor" severuty implies. Is it?

AdrianR

AdrianR

2022-07-20 08:40

reporter   ~71036

From all options,, "minor" is the best match for this

gabrieljenik

gabrieljenik

2022-07-21 17:49

manager   ~71087

In which cases this will be an issue?
I believe it is not a bug. Although strange, is not causing troubles, is it?

Right now, LS has lot of installations which could be impacted by a general change we can introduce.
If needed, we could add a setting to "enforce unique emails for accounts".

ollehar

ollehar

2022-07-21 18:34

reporter   ~71088

I guess if you make a typo in an email address, wrong person would get access to wrong data, and there will be no warning.

gabrieljenik

gabrieljenik

2022-07-21 19:02

manager   ~71089

I guess if you make a typo in an email address, wrong person would get access to wrong data, and there will be no warning.

Agree. But is that in relation to this ticket?

ollehar

ollehar

2023-11-14 15:14

reporter   ~78454

Someone reported a security issue related to this.

DenisChenu

DenisChenu

2023-11-14 16:59

developer   ~78458

It's not about sending out emails, but having the email address being unique for each user.

LDAP user didn't need email, WebServer user didn't need email.

I guess if you make a typo in an email address, wrong person would get access to wrong data, and there will be no warning.

And ? Why it's an issue ? With or without unique validation : user can make typo .

Someone reported a security issue related to this.

I like to know the security issue here ?

In my opinion : it's not a bug.

DenisChenu

DenisChenu

2023-11-14 17:14

developer   ~78467

Someone reported a security issue related to this.

Maybe related to allow user to connect via email only in AithLDAP ? In my opinion this must be disable (except with a setting maybe)

gabrieljenik

gabrieljenik

2023-11-14 20:03

manager   ~78481

My 2 cents.

LS doesn't use email as userid.
Now all systems do that.
But LS is kind of old, so LS is username based.

Nowadays, I wouldn't allow 2 users with same email.
Seems strange. Also, everyone expects to be unique now.

So, not a bug. But I would not allow it.

DenisChenu

DenisChenu

2023-11-15 08:50

developer   ~78485

Last edited: 2023-11-15 08:51

So, not a bug. But I would not allow it.

New global setting option ?

And in case of unicity : we must allow empty email (for webserver or LDAP plugin (and all other plugin without email address).

DenisChenu

DenisChenu

2023-11-15 11:27

developer   ~78492

PS : Now all systems do that.

It's false no php forum use email for identity.

gabrieljenik

gabrieljenik

2023-11-15 23:51

manager   ~78493

How do you use (and why it exist) Add dummy user

That's a good question.
Maybe just add random chars before the '@' as to comply.
like gabriel+123456@example.com

New global setting option ?

At PHP config level maybe.
That's not something to change often.

DenisChenu

DenisChenu

2023-11-16 08:43

developer   ~78494

Maybe just add random chars before the '@' as to comply.

Yes : but currently it was created since years with same email …

I know how to create multiple email address with one account (and i ca nuse + or _ personnaly)

At PHP config level maybe.

Yes, for starting, default to false (allow multiple user with same email).

We still need to allow user with empty email.

gabrieljenik

gabrieljenik

2023-11-16 13:11

manager   ~78501

Yes : but currently it was created since years with same email …

Not sure what you mean... Still, things can change, right?

Yes, for starting, default to false (allow multiple user with same email).

I would say the other way around.
For new installations, I wouldn't allow same email.

We still need to allow user with empty email.

If email is unique, means email is considered key.
Why would we allow empty then.?

DenisChenu

DenisChenu

2023-11-17 10:08

developer   ~78506

Not sure what you mean... Still, things can change, right?

Yes: but no issue since years with multiple user with same email address. I still waiting for the potential security issue with this behaviour.

I would say the other way around.

Why i really see NO reason to disallow same email for different user

For new installations, I wouldn't allow same email.

How do you now it's a new installation ?

Why would we allow empty then.?

We don't need email for webserver Auth, LDAP Auth etc … Why force something not necessary ? It's an issue since years … Auth plugin

For webserver : we get it form config.php : https://github.com/LimeSurvey/LimeSurvey/blob/5c210ea28a6d14d6e8442eeef75155ed3bdd742a/application/core/plugins/Authwebserver/Authwebserver.php#L127
I already create a fork of AuthLDAP allowing LDAP without email
Shiboiolet don't force email : https://github.com/atlet/LimeSurvey-ShibbolethAuth/blob/174a2234a82586169869d4987e467b6f2ce6b00a/ShibbolethAuth.php#L96
etc …

If you force unicity on email and disallow empty email : you broke 3 plugins … without an option to fix it …

ollehar

ollehar

2023-11-17 11:56

reporter   ~78508

See https://bugs.limesurvey.org/view.php?id=19237

ollehar

ollehar

2023-11-17 12:05

reporter   ~78509

What about unique constraint but allow empty email?

DenisChenu

DenisChenu

2023-11-17 15:05

developer   ~78511

See https://bugs.limesurvey.org/view.php?id=19237

Already answered :
https://bugs.limesurvey.org/view.php?id=19237#c78461

What about unique constraint but allow empty email?

Already answered :
https://bugs.limesurvey.org/view.php?id=18257#c78485

gabrieljenik

gabrieljenik

2023-11-17 15:11

manager   ~78512

Why i really see NO reason to disallow same email for different user

It is not what the usual people expect today.

We don't need email for webserver Auth, LDAP Auth etc … Why force something not necessary ? It's an issue since years … Auth plugin

I haven't gone that dip. Still, I was picturing to be handled outside of the auth plugins.
Just like any other extra piece of data, as it would be a phone number.
Not sure that's possible though.

What about unique constraint but allow empty email?

Could be good

DenisChenu

DenisChenu

2026-04-24 16:33

developer   ~84741

  1. I really see NO reason to disallow the same email for different users.
  2. Why not add it as an option?
tibor.pacalat

tibor.pacalat

2026-05-12 12:26

administrator   ~84829

I found a couple of issues here: https://github.com/LimeSurvey/LimeSurvey/pull/4881

  1. If I import csv with duplicate emails, I get json output (screenshot 1)
  2. In the modal it says duplicates are found by users_name. We should add email as well (screenshot 2)
Screenshot1.png (59,051 bytes)   
Screenshot1.png (59,051 bytes)   
Screenshot2.png (42,749 bytes)   
Screenshot2.png (42,749 bytes)   
lajosarpad

lajosarpad

2026-05-19 18:02

developer   ~84850

We have a PR for this issue, already merged into a branch that's going to be merged into develop-major as soon as we make it. Here's the part of the work that addresses Tibor's findings: https://github.com/LimeSurvey/LimeSurvey/pull/4984

Mazi

Mazi

2026-05-20 10:20

updater   ~84861

@lajosarpad, I agree to @DenisChenu: What is the actual security issue here? I know of dozens of users using the same email for multiple admin accounts. What is the actual issue with this?

If we add a new restriction, I vote for having a global setting the admins can use to allow/disallow multiple accounts for the same email.

What happens to existing accounts? Can this cause any issues e.g. when saving a changed password?

lajosarpad

lajosarpad

2026-05-20 12:56

developer   ~84864

This is a decision that was already made. I'm not sure about the exact reason, but I can ask about it.

Issue History

Date Modified Username Field Change
2022-07-19 09:20 AdrianR New Issue
2022-07-19 10:35 ollehar Note Added: 71007
2022-07-19 10:35 ollehar Bug heat 0 => 2
2022-07-19 11:58 tpartner Note Added: 71009
2022-07-19 11:58 tpartner Bug heat 2 => 4
2022-07-19 11:59 tpartner Note Edited: 71009
2022-07-19 12:00 tpartner Note Edited: 71009
2022-07-19 12:00 ollehar Note Added: 71010
2022-07-19 12:01 tpartner Note Added: 71011
2022-07-19 20:02 gabrieljenik Note Added: 71020
2022-07-19 20:02 gabrieljenik Bug heat 4 => 6
2022-07-20 08:40 AdrianR Note Added: 71036
2022-07-20 08:40 AdrianR Bug heat 6 => 8
2022-07-21 17:49 gabrieljenik Note Added: 71087
2022-07-21 17:49 gabrieljenik Status new => feedback
2022-07-21 18:34 ollehar Note Added: 71088
2022-07-21 19:02 gabrieljenik Note Added: 71089
2023-11-14 15:14 ollehar Note Added: 78454
2023-11-14 16:59 DenisChenu Note Added: 78458
2023-11-14 16:59 DenisChenu Bug heat 8 => 10
2023-11-14 17:14 DenisChenu Note Added: 78467
2023-11-14 20:03 gabrieljenik Note Added: 78481
2023-11-15 08:50 DenisChenu Note Added: 78485
2023-11-15 08:51 DenisChenu Note Edited: 78485
2023-11-15 11:27 DenisChenu Note Added: 78492
2023-11-15 16:32 DenisChenu Relationship added related to 19237
2023-11-15 23:51 gabrieljenik Note Added: 78493
2023-11-16 08:43 DenisChenu Note Added: 78494
2023-11-16 13:11 gabrieljenik Note Added: 78501
2023-11-17 10:08 DenisChenu Note Added: 78506
2023-11-17 11:56 ollehar Note Added: 78508
2023-11-17 12:05 ollehar Note Added: 78509
2023-11-17 15:05 DenisChenu Note Added: 78511
2023-11-17 15:11 gabrieljenik Note Added: 78512
2026-04-24 16:33 DenisChenu Note Added: 84741
2026-05-12 12:26 tibor.pacalat Note Added: 84829
2026-05-12 12:26 tibor.pacalat File Added: Screenshot1.png
2026-05-12 12:26 tibor.pacalat File Added: Screenshot2.png
2026-05-12 12:26 tibor.pacalat Bug heat 10 => 12
2026-05-19 18:02 lajosarpad Note Added: 84850
2026-05-19 18:02 lajosarpad Bug heat 12 => 14
2026-05-20 10:20 Mazi Note Added: 84861
2026-05-20 10:20 Mazi Bug heat 14 => 16
2026-05-20 12:56 lajosarpad Note Added: 84864