A critical vulnerability was discovered in React Server Components (Next.js). Our Systems Remain Fully Protected. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our Systems Remain Fully Protected. Learn More.
Hi all, I got an exception when creating contact in Turkish. Please see my sample code:
private void Add(CustomerContactModel contact, MembershipUser user){var customerEpiserver = Mediachase.Commerce.Customers.CustomerContact.CreateInstance(user);customerEpiserver.FirstName = contact.Firstname;customerEpiserver.LastName = contact.Lastname;customerEpiserver.Email = contact.EmailAddress;// Assembly: Mediachase.Commerce, Version=5.2.628.0 & Mediachase.BusinessFoundation.Data, Version=2.4.3.0customerEpiserver.SaveChanges();//Exception: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)}Debugging I see the exception from "EvaluateGuid" function in Mediachase.BusinessFoundation.Data.Meta.DefaultValue class. The system tried to create default value (new guid) for CreatorId and ModifierId fields, but it failed.Please see the following screen-set for more details:
You can see "if (string.Compare(field.DefaultValue, "NEWID()", true) == 0)" always return 'false' in Turkish culture (tr-tr). Therefore, line 114 is excuted => exception.
Could you please give me advise to fix this issue in this case (Turkish language -
Mediachase.Commerce, Version=5.2.628.0)?Many Thanks!
P/S: When I decompiled Mediachase.BusinessFoundation.Data, Version=10.8.0.0, I see that EpiServer already fixed this issue by using line of code
if (string.Compare(field.DefaultValue, "NEWID()", StringComparison.InvariantCultureIgnoreCase) == 0)