Duo Pro seat assignment email contains broken link due to relative URL

Summary

The Duo Pro seat assignment email template contains a broken "Go to GitLab" link because it uses a relative path instead of an absolute URL.

Current Behavior

In ee/app/views/gitlab_subscriptions/duo_seat_assignment_mailer/duo_pro_email.html.haml line 99, the template uses:

%a{ href: new_session_path(:user), ... }

This generates a relative URL in the email:

<a href="/users/sign_in">Go to GitLab</a>

Problem

Email clients cannot resolve relative URLs because they lack a base URL context. When users click the "Go to GitLab" button in the email, the link is broken and doesn't navigate to the GitLab instance.

Expected Behavior

The link should use an absolute URL so it works correctly in email clients:

<a href="https://gitlab.example.com/users/sign_in">Go to GitLab</a>

Solution

Change line 99 from:

%a{ href: new_session_path(:user), ... }

To:

%a{ href: new_user_session_url, ... }

This follows the same pattern as all other links in the template, which correctly use _url helpers (e.g., help_page_url).

Impact

  • Users receiving Duo Pro seat assignment emails cannot click the "Go to GitLab" button to access their instance
  • Affects all self-managed instances sending this email since it was introduced in GitLab 17.5
Edited by 🤖 GitLab Bot 🤖