Skip to content

Ensure ref passed to SearchFiles is ASCII-8BIT encoded

John McDonnell requested to merge jmd/fix-search-with-non-ascii-ref into master

What does this MR do and why?

Fixes Umlauts in branch names lead to 500 error in se... (#393400 - closed)

Fixes issue where searching for text, while on a branch containing non ascii chars leads to a 500 error in search results.
The issue caused shows a Encoding::UndefinedConversionError: U+00E4 from UTF-8 to ASCII-8BIT error.
This can be addressed by encoding the ref as binary.

How to set up and validate locally

  • Create a branch on a project containing an Umlaut or other special character (tested ü,ö,ä,ß)
  • Navigate to the branch (example)
  • Search for any string in the search bar
  • The resulting page will display a 500 error

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by John McDonnell

Merge request reports