Commit 4e055e8a631ead1e8556287866e7a55f4a97062d

Authored by tsl0922
1 parent ef61d1f2

fix: UTF-8 encoding error

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
lib/gitlab/backend/grack_auth.rb
... ... @@ -109,6 +109,8 @@ module Grack
109 109 else
110 110 input = @request.body.read
111 111 end
  112 + # force utf-8 encoding
  113 + input.encode!('UTF-8', 'UTF-8', invalid: :replace, undef: :replace, replace: '')
112 114 # Need to reset seek point
113 115 @request.body.rewind
114 116 /refs\/heads\/([\w\.-]+)/.match(input).to_a.last
... ...