diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-11 01:50:23 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-11 01:54:14 +0300 |
commit | 1edf1807c570d74ee0039f5f58ef607ee797187a (patch) | |
tree | 172ff4fd62d291c2edc322d332b83b5efa6a24da /lib/gitlab/gitaly_client | |
parent | 3017d2a52a3da5dc8e701f442b6d7c65c19cc054 (diff) |
Fix UTF-8 conversion issues when resolving conflicts
Similar to https://gitlab.com/gitlab-org/gitlab-ce/issues/63030,
when the commit message in the /resolve_conflicts endpoint contains a
UTF-8 character, the conversion to the Gitaly ASCII-8BIT value may flag
an error. To fix this, we run `force_encoding` on the commit message.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63062
Diffstat (limited to 'lib/gitlab/gitaly_client')
-rw-r--r-- | lib/gitlab/gitaly_client/conflicts_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/gitaly_client/conflicts_service.rb b/lib/gitlab/gitaly_client/conflicts_service.rb index 077b63205a8..3ab4ef4adfb 100644 --- a/lib/gitlab/gitaly_client/conflicts_service.rb +++ b/lib/gitlab/gitaly_client/conflicts_service.rb @@ -67,7 +67,7 @@ module Gitlab their_commit_oid: @their_commit_oid, source_branch: source_branch, target_branch: target_branch, - commit_message: resolution.commit_message, + commit_message: encode_binary(resolution.commit_message), user: Gitlab::Git::User.from_gitlab(resolution.user).to_gitaly ) end |