Putting invalid UTF8 data in a wiki throws 500 errors
Summary
If I put invalid UTF8 data (\xDC
for example) in a wiki page GitLab throws 500 errors.
Steps to reproduce
- create wiki page
- clone wiki
- hexedit a file and put
\xDC
in the file - commit & push
- goto
/:namespace/wikis/home
and get your 500 error
Example Project
https://gitlab.com/bkc/testing-wiki-break/wikis/home
What is the current bug behavior?
Throws 500
What is the expected correct behavior?
Sanitize the data? Throw a meaningful error?
Additional info
I was debugging gitaly#1140 (closed) and when I checked the behaviour without that gitaly feature flag enabled I noticed that it's a pre-existing bug
Output of checks
This bug happens on GitLab.com
Possible fixes
This looks promising https://github.com/gollum/rugged_adapter/issues/24
/cc @jramsay since Wiki