Skip to content

Do not allow emails with trailing spaces to be added as invites

Doug Stull requested to merge 414749-fix-invite-token into master

What does this MR do and why?

📓 This change takes the approach of preventing a situation that causes a bug by not allowing user defined tokens for emails with leading or trailing spaces.

Do not allow emails with trailing spaces to be added as invites see https://gitlab.com/gitlab-org/gitlab/-/issues/414749#note_1433106116

  • keeps us out of incorrect error reporting in the dom as seen below snapshot of current master behavior when email with spaces are used.

Screenshot_2023-06-16_at_12.04.21_PM

Changelog: fixed

Screenshots or screen recordings

Before After
Screenshot_2023-06-16_at_1.01.23_PM Screenshot_2023-06-16_at_12.57.43_PM

How to set up and validate locally

  1. Visit any group or project that your user is owner/maintainer of.
  2. On the members page, click 'Invite members'
  3. Attempt to simulate scenario in screenshots on before(master) and now.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #414749

Edited by Doug Stull

Merge request reports