diff --git a/lib/gitlab/backend/grack_auth.rb b/lib/gitlab/backend/grack_auth.rb index 8b43b60..6d87df1 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 -- libgit2 0.21.2