-
- Downloads
Fix Error 500s due to encoding issues when Wiki hooks fire
Saved Wiki content goes through the GitalyClient::WikiService, which calls StringIO#set_encoding on the input stream. The problem is that this call mutates the encoding of the given string object to ASCII-88BIT, which causes problems for models expecting the data to still be in UTF-8. Freezing the input disables this behavior: https://github.com/ruby/ruby/blob/v2_4_4/ext/stringio/stringio.c#L1583 Closes #50590
Showing
- changelogs/unreleased/sh-fix-error-500-updating-wikis.yml 5 additions, 0 deletionschangelogs/unreleased/sh-fix-error-500-updating-wikis.yml
- lib/gitlab/encoding_helper.rb 1 addition, 1 deletionlib/gitlab/encoding_helper.rb
- spec/lib/gitlab/encoding_helper_spec.rb 12 additions, 0 deletionsspec/lib/gitlab/encoding_helper_spec.rb
Please register or sign in to comment