View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0032404 | Plugin - EmailReporting | General | public | 2023-04-17 03:24 | 2023-04-25 07:17 |
| Reporter | mpeterma | Assigned To | SL-Gundam | ||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | resolved | Resolution | not fixable | ||
| Platform | Server | OS | NetBSD | OS Version | 9.3 |
| Product Version | 0.10.1 | ||||
| Summary | 0032404: Case Sensitive behavior of automatic account registration on email receipt creates duplicate user accounts | ||||
| Description | I just noticed one little thing. I have configured the EmailReporting plugin to automatically register new users. This uses the email address as the username. At the moment this method behaves case sensitive, i.e. if a user writes me an email from his address "Matthias.Petermann@example.com", and later from another client in which the address "matthias.petermann@example.com" is set, so two accounts are created for this user. Are there any reasons why this is the case or would it be a good idea to convert to lower case by default before creating the account? The luxury option would of course be to have the behavior configurable in the plugin configuration, but that may not even be necessary, because in email addresses actually lowercase is common. To be honest, the problem has practically only occurred with me in cases where I created an account for the users in advance and had entered the email address in lower case, but the users then sent their first email with upper case in the sender. I have now corrected this "adminstratively" for the time being. | ||||
| Steps To Reproduce | Preparation:
Steps:
Result:
| ||||
| Tags | No tags attached. | ||||
|
By default i believe MantisBT preferres UTF8 which defaults to utf8_general_ci as the charset for the database on standard MySQL database installations. What charset is your database your using? In particular for the email field in the user table? |
|
|
Hello, thank you very much for looking at my request. It is a PostgreSQL database with Characterset de_DE.UTF-8. Do you think that the behavior could be a difference in the data type definition of the column? I had not thought that far. I have just looked into the schema with SquirrelSQL. The field username in the table mantis_user_table is of type varchar. In PostgreSQL this type is case sensitive. However, there is another type "citext" available which is a case insensitive text. However not in PostgreSQL core but as extension. If it is the case that the behavior is different in other databases, would a "tolower" in the EmailReporting plugin be something you could support? |
|
|
It seems PostgreSQL is case sensitive at all times in its standard version without extensions. Please check whether or not you can create a new user through MantisBT with varying cases in the email address. If that's possible you could report this as a bug to MantisBT and they could fix it systemwide. |
|
|
Hello, sorry to have kept you waiting. I found the time to run the test today and you guessed correctly - I can use the same email address when creating an account in MantisBT several times if I vary the case accordingly. Since I have not been using MantisBT for a long time and am just getting used to it, I was quite surprised that the full-text search of the ticket filter seems to be case-sensitive as well. I will do some more research on this at the next opportunity. Shall we move the ticket for the current case to MantisBT until then? I agree that under the given conditions or with the findings, this one is more likely to be located there. Best regards, Matthias |
|
|
Moved. Please update the issue information accordingly. |
|
|
Hey guys, Sorry about the ping-pong with this issue, but considering that the original report is clearly about the Email Reporting plugin, I would prefer if this was kept in your project (feel free to resolve it as not fixable if you want). Please open a separate issue one to track the case sensitivity problem, we can then link it back to this. That being said, please note that MantisBT does not enforce an e-mail address to be unique, there could be multiple user accounts with the same e-mail. |
|
|
@dregad I think MantisBT tries to enforce this based on the $g_email_ensure_unique setting which by default is turned on. MantisBT does not take into account a case sensitive database during the enforcement. We'll close the issue here and @mpeterma will create a new issue at his leisure. |
|
You're right I forgot about this setting - I've used a tracker where this is actually OFF for a long time and it sometimes makes me confuse the real default values of some
OK, great. |
|
|
I created 0032451 to track the issue in MantisBT core api. |
|
As a side note, there is one good reason to have it set to OFF, if you are using a system that started with version < 1.3.0-rc.2, see 0020647 |
|
|
Hello everyone, I have followed the discussion closely and am glad that the topic has now landed in the right channel. Thank you and many greetings, Matthias |
|