News:

Wondering if this will always be free?  See why free is better.

Main Menu

Apostrophe in email address causing error

Started by Comms Group, April 05, 2023, 04:23:08 AM

Previous topic - Next topic

Comms Group

Hi, I have recently updated the software to 2.0.19. But I encountered the following error while setting up an account with apostrophe in the email address (example DerrickO'[email protected]). Interestingly, the error wasn't shown at the time of registering but when I (as admin) try to edit the Account Settings and save, the error is displayed.

The following errors occurred when trying to save your profile:
You have not entered a valid email address.

Not sure if the upgrade has resulted in this problem as we already have some accounts with apostrophe in the email address.

Can someone please help with a solution? Thanks

Comms Group

Ok, so I uninstalled the 2.0.19 patch and the error was no longer encountered. I hope SMF do fix this issue in the next patch. Thanks

Sesquipedalian

Hm. That seems odd. From what I can tell, the changes in SMF 2.0.19 didn't alter anything in the code that is used to validate email addresses.

Did you also change PHP versions? What mods do you have installed?
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sir Osis of Liver

#3
Confirmed in 2.0.19, php 7.4.33.  No mods.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sesquipedalian

Interesting. Upon further investigation, I suspect that this may have been caused by some changes to the entity handling code in 2.0.19, which was needed in order to solve other bugs.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sir Osis of Liver

Odd thing is, email address is accepted in registration, but rejected in profile settings.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Comms Group

QuoteDid you also change PHP versions? What mods do you have installed?

No, I didn't change the PHP version.

When I installed the 2.0.19 patch, I was happy to get rid of the issue related to special characters being converted to HTML code in text fields. But with that fix, this apostrophe related issue came up.
Now that I have removed the patch, the issue related to special characters is back. :(

May be I should install the patch again and wait for resolution of this 'apostrophe' issue in the next patch.

Comms Group

Reinstalling the patch now doesn't seem to work on special characters if I go and modify the profile somehow. :(

The error log is showing errors stating:

Ran into problems sending Mail. Error: 501 <Derrick.O'[email protected]>: "@" or "." expected after "Derrick.O'"

Also the memberlist is showing the email address of the user as Derrick.O&#039;[email protected] even though the member's Account Settings are not displaying the HTML code in email address.

I have had to try uninstalling and installing the patch a few times to apply a workaround. I hope these issues are fixed in the next patch so that I don't have to again try uninstalling or installing this patch. :-(

Arantor

The 039 is the HTML code for an apostrophe, so it will be shown as such in most cases.

Sesquipedalian

Quote from: Comms Group on April 06, 2023, 03:13:33 AMWhen I installed the 2.0.19 patch, I was happy to get rid of the issue related to special characters being converted to HTML code in text fields. But with that fix, this apostrophe related issue came up.
Now that I have removed the patch, the issue related to special characters is back. :(

Yes, if my suspicion is correct, the fix for the old issue caused the new issue.

Rather than waiting for another patch to the 2.0.x line, I recommend upgrading to 2.1.x as soon as possible. That will be the most expedient way to get a fix for this issue. I'm not on the official development team (I'm just a friendly contributor these days), so I can't say what their plans might be, but I suspect that it might be a while before the next patch for SMF 2.0.x is released. In contrast, SMF 2.1.x receives patches fairly frequently.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: