Skip to content

Trim whitespace from email addresses

What does this MR do?

This merge request trims whitespace from the email address user input in the Project Member invite form.

Are there points in the code the reviewer needs to double check?

Perhaps this sanitization should apply to other form fields dealing with emails as user IDs. I originally changed this using .strip in member_invited_email in app/mailers/emails/member.rb but it seemed better to have the UI show it correctly. Perhaps both places should be changed?

Why was this MR needed?

In production, a trailing whitespace causes the invitation of a project member by email to fail silently.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

22127

Merge request reports