Issue created by email with body containing text/plain is not created correctly

Summary

When creating an issue via the "Email a new merge request to this project", if the email body contains the string text/plain, the issue that is created has no description.

Steps to reproduce

Using the New issue via email process.

  1. Set the subject of the email to Test (this doesn't actually matter)
  2. Set the body of the email to text/plain
  3. Send email
  4. Got to issue that is created
  5. See that the issue has a title, but no description

What is the current bug behavior?

Issue has no description

What is the expected correct behavior?

Issue should have the description containing the string text/plain.

This issue is relevant, because it is very common when writing a bug issue to put steps to reproduce, and those can include things like a curl command, which often contains the phrase -H 'Accept: application/json, text/plain etc, or pasting the response headers from a request etc.

Output of checks

This bug happens on GitLab.com

Actually, the outcome is slightly different - the issue actually is never created on gitlab.com. Almost certainly the same cause though

Possible fixes

The issue appears to be occurring from this line of code:

https://gitlab.com/gitlab-org/gitlab-ce/blob/b51770c66acf4ed7f1aa1df0019abcdb0e4cc130/lib/gitlab/email/reply_parser.rb#L51

It is checking for the email being parsed correctly by looking for some keywords that would show it was parsed incorrectly, however this issue clearly shows that there is false positives for that test.

Edited Jun 27, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading