Preview in New Merge Request description box does not handle non-ASCII characters
Summary
When taking a screenshot on MacOSX, the filename is saved with a non-ASCII filename. For example, "スクリンショット-2018-08-15 at 17.02.46
"
When we drag and drop the file in Gitlab’s New Merge Request’s description box, the image doesn’t display in preview when the filename has non-ascii.
Steps to reproduce
- Click New Merge Request.
- Take a screenshot (shift+command+3) or an image file with non-ascii characters in the filename.
- Drag and drop the file into the description box when the box is in the "Write" mode.
- Click "Preview" and see that image doesn't display. Instead, a broken image icon is displayed.
Example Project
N/A
What is the current bug behavior?
A broken image icon is displayed.
What is the expected correct behavior?
The image in the file should be shown as is images from filenames with ASCII only in the filename are.
Relevant logs and/or screenshots
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.1.4-ee Revision: d17962f Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.6 URL: [redacted] HTTP Clone URL: [redacted] SSH Clone URL: [redacted] Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2, github
GitLab Shell Version: 7.1.4 Repository storage paths:
- default: /mnt/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 12/1 ... repository is empty 8/2 ... ok 8/3 ... ok 8/4 ... ok 8/5 ... ok 8/6 ... ok 8/7 ... ok 8/8 ... ok 8/9 ... ok 8/10 ... ok 13/11 ... ok 8/12 ... repository is empty 8/13 ... ok 2/14 ... ok 2/15 ... ok 5/16 ... ok 14/17 ... ok 5/18 ... ok 20/19 ... ok 20/20 ... ok 20/21 ... ok 21/22 ... ok 14/23 ... ok 8/24 ... ok 8/25 ... ok 8/26 ... ok 5/27 ... ok 5/28 ... ok 5/29 ... ok 19/31 ... ok 2/33 ... ok 7/34 ... ok 7/35 ... ok 7/36 ... ok 2/37 ... ok 2/38 ... ok 26/39 ... ok 11/40 ... ok 8/41 ... ok 19/42 ... ok 19/43 ... ok 20/44 ... ok 19/45 ... ok 19/46 ... ok 20/47 ... ok 2/48 ... ok 8/49 ... ok 2/50 ... ok 14/51 ... ok 8/52 ... ok 19/53 ... ok 7/54 ... ok 19/55 ... ok 19/56 ... ok 7/57 ... ok 8/58 ... ok 13/59 ... ok 32/60 ... ok 32/61 ... ok 25/62 ... ok 2/63 ... ok 8/64 ... ok 33/65 ... ok 5/66 ... ok 25/67 ... ok 19/68 ... ok 25/69 ... ok 25/70 ... ok 25/71 ... ok 31/72 ... ok 31/73 ... ok 7/74 ... ok 19/75 ... ok 31/76 ... ok 24/77 ... ok 5/78 ... ok 14/80 ... repository is empty 29/81 ... repository is empty 28/82 ... ok 26/83 ... ok 13/85 ... ok 13/86 ... ok 11/87 ... ok 2/88 ... ok 2/89 ... repository is empty 17/90 ... repository is empty 5/91 ... ok 21/92 ... ok 11/94 ... ok 13/96 ... ok 7/98 ... ok 26/99 ... ok 8/100 ... ok 8/102 ... ok 19/103 ... ok 28/104 ... ok 24/105 ... ok 25/106 ... ok 19/107 ... ok 7/108 ... ok 8/109 ... ok 33/110 ... ok 24/111 ... ok 28/112 ... repository is empty 31/113 ... ok 2/114 ... ok 7/115 ... ok 2/116 ... ok 2/117 ... ok 33/118 ... ok 24/119 ... ok 5/120 ... ok 7/121 ... ok 24/122 ... ok 36/123 ... ok 33/124 ... ok 36/125 ... ok 26/126 ... ok 13/127 ... ok 33/128 ... ok 33/129 ... ok 24/131 ... ok 7/132 ... ok 13/133 ... ok 33/134 ... ok 19/135 ... ok 5/136 ... ok 5/137 ... ok 40/138 ... ok 7/139 ... ok 36/140 ... ok 26/141 ... ok 13/142 ... ok 39/143 ... ok 8/144 ... ok 7/145 ... ok 38/146 ... ok 41/147 ... repository is empty 41/148 ... ok 40/149 ... ok 7/150 ... ok 39/151 ... ok 13/152 ... ok 31/155 ... ok 31/156 ... ok 7/157 ... ok 38/158 ... ok 7/159 ... ok 25/160 ... ok 40/162 ... ok 40/163 ... ok 21/164 ... ok 33/165 ... ok 33/166 ... ok 39/167 ... ok 13/168 ... ok 7/169 ... ok 30/170 ... ok 26/171 ... ok 45/172 ... ok 7/173 ... ok 8/174 ... ok 25/175 ... ok 11/176 ... ok 8/177 ... ok 28/178 ... ok 33/180 ... ok 33/181 ... ok 7/182 ... ok 7/183 ... ok 36/185 ... ok 7/186 ... ok 13/187 ... ok 36/188 ... ok 36/189 ... ok 28/190 ... ok 28/191 ... ok 28/192 ... ok 33/193 ... ok 43/194 ... ok 30/195 ... ok 7/196 ... ok 33/197 ... ok 7/198 ... ok 5/199 ... ok 5/200 ... ok 7/201 ... ok 28/202 ... ok 21/203 ... ok 13/204 ... ok 22/205 ... ok 33/206 ... ok 36/207 ... ok 33/208 ... ok 13/209 ... repository is empty 13/210 ... ok 5/211 ... ok 11/212 ... ok 5/213 ... ok 28/214 ... ok 25/215 ... ok 2/216 ... ok 29/217 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... 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? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 12/1 ... yes 8/2 ... yes 8/3 ... yes 8/4 ... yes 8/5 ... yes 8/6 ... yes 8/7 ... yes 8/8 ... yes 8/9 ... yes 8/10 ... yes 13/11 ... yes 8/12 ... yes 8/13 ... yes 2/14 ... yes 2/15 ... yes 5/16 ... yes 14/17 ... yes 5/18 ... yes 20/19 ... yes 20/20 ... yes 20/21 ... yes 21/22 ... yes 14/23 ... yes 8/24 ... yes 8/25 ... yes 8/26 ... yes 5/27 ... yes 5/28 ... yes 5/29 ... yes 19/31 ... yes 2/33 ... yes 7/34 ... yes 7/35 ... yes 7/36 ... yes 2/37 ... yes 2/38 ... yes 26/39 ... yes 11/40 ... yes 8/41 ... yes 19/42 ... yes 19/43 ... yes 20/44 ... yes 19/45 ... yes 19/46 ... yes 20/47 ... yes 2/48 ... yes 8/49 ... yes 2/50 ... yes 14/51 ... yes 8/52 ... yes 19/53 ... yes 7/54 ... yes 19/55 ... yes 19/56 ... yes 7/57 ... yes 8/58 ... yes 13/59 ... yes 32/60 ... yes 32/61 ... yes 25/62 ... yes 2/63 ... yes 8/64 ... yes 33/65 ... yes 5/66 ... yes 25/67 ... yes 19/68 ... yes 25/69 ... yes 25/70 ... yes 25/71 ... yes 31/72 ... yes 31/73 ... yes 7/74 ... yes 19/75 ... yes 31/76 ... yes 24/77 ... yes 5/78 ... yes 14/80 ... yes 29/81 ... yes 28/82 ... yes 26/83 ... yes 13/85 ... yes 13/86 ... yes 11/87 ... yes 2/88 ... yes 2/89 ... yes 17/90 ... yes 5/91 ... yes 21/92 ... yes 11/94 ... yes 13/96 ... yes 7/98 ... yes 26/99 ... yes 8/100 ... yes 8/102 ... yes 19/103 ... yes 28/104 ... yes 24/105 ... yes 25/106 ... yes 19/107 ... yes 7/108 ... yes 8/109 ... yes 33/110 ... yes 24/111 ... yes 28/112 ... yes 31/113 ... yes 2/114 ... yes 7/115 ... yes 2/116 ... yes 2/117 ... yes 33/118 ... yes 24/119 ... yes 5/120 ... yes 7/121 ... yes 24/122 ... yes 36/123 ... yes 33/124 ... yes 36/125 ... yes 26/126 ... yes 13/127 ... yes 33/128 ... yes 33/129 ... yes 24/131 ... yes 7/132 ... yes 13/133 ... yes 33/134 ... yes 19/135 ... yes 5/136 ... yes 5/137 ... yes 40/138 ... yes 7/139 ... yes 36/140 ... yes 26/141 ... yes 13/142 ... yes 39/143 ... yes 8/144 ... yes 7/145 ... yes 38/146 ... yes 41/147 ... yes 41/148 ... yes 40/149 ... yes 7/150 ... yes 39/151 ... yes 13/152 ... yes 31/155 ... yes 31/156 ... yes 7/157 ... yes 38/158 ... yes 7/159 ... yes 25/160 ... yes 40/162 ... yes 40/163 ... yes 21/164 ... yes 33/165 ... yes 33/166 ... yes 39/167 ... yes 13/168 ... yes 7/169 ... yes 30/170 ... yes 26/171 ... yes 45/172 ... yes 7/173 ... yes 8/174 ... yes 25/175 ... yes 11/176 ... yes 8/177 ... yes 28/178 ... yes 33/180 ... yes 33/181 ... yes 7/182 ... yes 7/183 ... yes 36/185 ... yes 7/186 ... yes 13/187 ... yes 36/188 ... yes 36/189 ... yes 28/190 ... yes 28/191 ... yes 28/192 ... yes 33/193 ... yes 43/194 ... yes 30/195 ... yes 7/196 ... yes 33/197 ... yes 7/198 ... yes 5/199 ... yes 5/200 ... yes 7/201 ... yes 28/202 ... yes 21/203 ... yes 13/204 ... yes 22/205 ... yes 33/206 ... yes 36/207 ... yes 33/208 ... yes 13/209 ... yes 13/210 ... yes 5/211 ... yes 11/212 ... yes 5/213 ... yes 28/214 ... yes 25/215 ... yes 2/216 ... yes 29/217 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 30 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
Possible fixes
N/A