diff options
author | tsl0922 <tsl0922@gmail.com> | 2013-04-20 09:18:37 +0800 |
---|---|---|
committer | tsl0922 <tsl0922@gmail.com> | 2013-05-03 10:58:53 +0800 |
commit | 4e055e8a631ead1e8556287866e7a55f4a97062d (patch) | |
tree | 80df401d4211097c8d572f11513fbd701d3b6c68 /lib | |
parent | ef61d1f20004f20ec4a421f9bfd698ac070783dd (diff) | |
download | gitlab-ce-4e055e8a631ead1e8556287866e7a55f4a97062d.tar.gz |
fix: UTF-8 encoding error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/backend/grack_auth.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/backend/grack_auth.rb b/lib/gitlab/backend/grack_auth.rb index 8b43b606890..6d87df17e75 100644 --- a/lib/gitlab/backend/grack_auth.rb +++ b/lib/gitlab/backend/grack_auth.rb @@ -109,6 +109,8 @@ module Grack else input = @request.body.read end + # force utf-8 encoding + input.encode!('UTF-8', 'UTF-8', invalid: :replace, undef: :replace, replace: '') # Need to reset seek point @request.body.rewind /refs\/heads\/([\w\.-]+)/.match(input).to_a.last |