Skip to content

Commit

Permalink
dont allow ' in emails
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmayer committed Jan 19, 2023
1 parent 652acd0 commit 28bc97c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/internet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class InternetModule {
let localPart: string = this.userName(firstName, lastName);
// Strip any special characters from the local part of the email address
// This could happen if invalid chars are passed in manually in the firstName/lastName
localPart = localPart.replace(/[^A-Za-z0-9._+\-\']+/g, '');
localPart = localPart.replace(/[^A-Za-z0-9._+\-]+/g, '');

// The local part of an email address is limited to 64 chars per RFC 3696
// We limit to 50 chars to be more realistic
Expand Down

0 comments on commit 28bc97c

Please sign in to comment.