Incorrect fonts can be used in email notifications when issues are updated
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When the user is mentioned in the comments of an issue, the mentioned user receives an email notification. Regarding this notification, a customer reports that in certain cases the unnatural fonts are being used.
In the customer's environment, the notification email with the message written in Japanese is displayed in Chinese font if all the following conditions are met.
- The user is using the desktop version of the Microsoft Outlook
- The comment that caused the email notification did not use bullet points.
This issue occurred after customers upgraded from 16.9.6 to 17.2.9. This is likely due to the font family definition change described below.
In the v16.9.6-ee, v16.11.10-ee and v17.1.8-ee, the font-family is defined as follows.
body {
font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,Blink=
MacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neu=
e",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto =
Color Emoji"; font-size: inherit;
}
In the v17.2.9-ee, the font-family is defined as follows. (--default-regular-font is not used)
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
Steps to reproduce
- Set up the test instance.
- GitLab version is 16.9.6
- Can send emails (Configure SMTP settings as necessary)
- Create users, groups, projects, and the issues for test
- Send a mention to the user on the issue
- Receive the email notification, then check the source of the email
- Upgrade the version to 17.2.9 (by following the upgrade paths)
- Send a mention to the user on the issue
- Receive the email notification, then check the source of the email
Example Project
N/A
What is the current bug behavior?
- HTML emails are displayed in unnatural fonts in certain cases
What is the expected correct behavior?
- Confirm whether the change in the definition of
font-familyin the CSS of HTML email is intentional. - If this was not the intentional change, restore the original state(default-regular-font is present)
Relevant logs and/or screenshots
- EML files of the email notification that sent from my test environment
- Screenshot of the affected email (Japanese language that displayed in Chinese font) is attached as the internal comment
Output of checks
This bug happens on GitLab.com (--default-regular-font is not used in the notification email from GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 3.1.5p253 Gem Version: 3.5.11 Bundler Version:2.5.11 Rake Version: 13.0.6 Redis Version: 7.0.15 Sidekiq Version:7.1.6 Go Version: unknown GitLab information Version: 17.2.9-ee Revision: 91146650fd2 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 14.11 URL: https://test2.kkamiya-sandbox.com HTTP Clone URL: https://test2.kkamiya-sandbox.com/some-group/some-project.git SSH Clone URL: ssh://git@test2.kkamiya-sandbox.com:2222/some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.37.0 Repository storages: \- default: unix:/var/opt/gitlab/gitaly/gitaly.socket GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Gitaly \- default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket \- default Version: 17.2.9 \- default Git Version: 2.45.2
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ... Checking GitLab Shell ... GitLab Shell: ... GitLab Shell version \>= 14.37.0 ? ... OK (14.37.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful Checking GitLab Shell ... Finished Checking Gitaly ... Gitaly: ... default ... OK Checking Gitaly ... Finished Checking Sidekiq ... Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1 Checking Sidekiq ... Finished Checking Incoming Email ... Incoming Email: ... Reply by email is disabled in config/gitlab.yml Checking Incoming Email ... Finished Checking LDAP ... LDAP: ... LDAP is disabled in config/gitlab.yml Checking LDAP ... Finished Checking GitLab App ... Database config exists? ... yes Tables are truncated? ... skipped All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 3/1 ... yes Redis version \>= 6.2.14? ... yes Ruby version \>= 3.0.6 ? ... yes (3.1.5) Git user has default SSH configuration? ... yes Active users: ... 2 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... skipped (Advanced Search is disabled) All migrations must be finished before doing a major upgrade ... skipped (Advanced Search is disabled) Checking GitLab App ... Finished Checking GitLab subtasks ... Finished