Skip to content

fix: ISSUE-7702 email links with unlucky length#7864

Open
stefan-geiger-mw wants to merge 2 commits intographql-hive:mainfrom
stefan-geiger-mw:fix/ISSUE-7702-email-links
Open

fix: ISSUE-7702 email links with unlucky length#7864
stefan-geiger-mw wants to merge 2 commits intographql-hive:mainfrom
stefan-geiger-mw:fix/ISSUE-7702-email-links

Conversation

@stefan-geiger-mw
Copy link
Copy Markdown

Background

See ISSUE-7702. When baseUrl has a unlucky length and split of domain/subdomains, dots are missing in emails.

Description

Use base64 to encode the emails bodies.

Checklist

  • Input validation
  • Output encoding
  • Authentication management
  • Session management
  • Access control
  • Cryptographic practices
  • Error handling and logging
  • Data protection
  • Communication security
  • System configuration
  • Database security
  • File management
  • Memory management
  • Testing - difficult to test for me at the moment :(

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a specific bug (ISSUE-7702) where email links generated with certain baseUrl lengths would incorrectly omit dots, leading to malformed URLs. The solution involves encoding the email bodies using Base64, ensuring the integrity of the links regardless of the baseUrl's structure and preventing data corruption during transmission.

Highlights

  • Email Encoding: Implemented Base64 encoding for email bodies to resolve an issue where email links could have missing dots due to baseUrl length variations.
Changelog
  • packages/services/workflows/src/lib/emails/providers.ts
    • Added textEncoding: 'base64' to the SMTP email configuration.
Activity
  • Input validation checklist item marked as complete.
  • Output encoding checklist item marked as complete.
  • Authentication management checklist item marked as complete.
  • Session management checklist item marked as complete.
  • Access control checklist item marked as complete.
  • Cryptographic practices checklist item marked as complete.
  • Error handling and logging checklist item marked as complete.
  • Data protection checklist item marked as complete.
  • Communication security checklist item marked as complete.
  • System configuration checklist item marked as complete.
  • Database security checklist item marked as complete.
  • File management checklist item marked as complete.
  • Memory management checklist item marked as complete.
  • Testing checklist item noted as difficult to test at the moment.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to fix an email formatting issue by base64 encoding the email body. The current change correctly configures the SMTP provider for this, but it appears to be incomplete. If the email body is now base64 encoded, other providers like Postmark and Sendmail also need to be updated to handle this encoding, otherwise they will send corrupted emails. Please apply the fix consistently across all supported email providers.

@n1ru4l n1ru4l mentioned this pull request Mar 18, 2026
@n1ru4l
Copy link
Copy Markdown
Contributor

n1ru4l commented Mar 18, 2026

@stefan-geiger-mw I pushed your branch to #7875, so docker images are built for the commit hash 7e9409caa59904f4974a5cc973db82763d1bc840.

We are ourselves not using SMTP, but postmark, so it would be great to have your help in testing this before merging!

@stefan-geiger-mw
Copy link
Copy Markdown
Author

Cool. I will use the docker image and will try to test it in our setup

@n1ru4l
Copy link
Copy Markdown
Contributor

n1ru4l commented Mar 26, 2026

Hey @stefan-geiger-mw, did you manage to test this fix?

@stefan-geiger-mw
Copy link
Copy Markdown
Author

A bit embarrassing for me, but we weren't running on the latest version of graphql-hive/console, so we first have to update our existing hive instance before testing the fix. Will still take a while until I can test the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants