diff options
author | Stan Hu <stanhu@gmail.com> | 2016-05-23 22:59:35 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-06-12 07:36:25 -0700 |
commit | 0fdfd2dd6e01648f4daf6853f11a3ffc9a678a55 (patch) | |
tree | 985c306c1885c68220ba99a40bd5426ac14d52ce /Gemfile.lock | |
parent | ff345f8ba11658c679b423e06bbc42b90af158eb (diff) | |
download | gitlab-ce-0fdfd2dd6e01648f4daf6853f11a3ffc9a678a55.tar.gz |
Fix Error 500 when viewing a blob with binary characters after the 1024-byte mark
Here was the problem:
1. When determining whether a given blob is viewable text, gitlab_git reads the first 1024 bytes and checks with Linguist whether it is a text or binary file.
2. If the blob is text, GitLab will attempt to display it.
3. However, if the text has binary characters after the first 1024 bytes, then GitLab will attempt to load the entire contents, but the encoding will be ASCII-8BIT since there are binary characters.
4. The Error 500 results when GitLab attempts to display a mix UTF-8 and ASCII-8BIT.
To fix this, we load as much data as we are willing to display so that the detection will work properly. Requires
an update to gitlab_git: gitlab-org/gitlab_git!86
Closes #13826
Diffstat (limited to 'Gemfile.lock')
-rw-r--r-- | Gemfile.lock | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index dfc15700494..15b3158c63e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -284,7 +284,7 @@ GEM posix-spawn (~> 0.3) gitlab_emoji (0.3.1) gemojione (~> 2.2, >= 2.2.1) - gitlab_git (10.1.0) + gitlab_git (10.1.3) activesupport (~> 4.0) charlock_holmes (~> 0.7.3) github-linguist (~> 4.7.0) @@ -408,7 +408,7 @@ GEM mime-types (>= 1.16, < 4) mail_room (0.7.0) method_source (0.8.2) - mime-types (2.99.1) + mime-types (2.99.2) mimemagic (0.3.0) mini_portile2 (2.1.0) minitest (5.7.0) |