Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G gitlab-ce
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedinexedi
  • gitlab-ce
  • Repository
  • gitlab-ce
  • spec
  • lib
  • gitlab
  • encoding_helper_spec.rb
Find file BlameHistoryPermalink
  • Stan Hu's avatar
    Fix Error 500s due to encoding issues when Wiki hooks fire · 038be9ff
    Stan Hu authored Aug 29, 2018
    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
    038be9ff
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7