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.
- Set the subject of the email to
Test(this doesn't actually matter) - Set the body of the email to
text/plain - Send email
- Got to issue that is created
- 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:
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.