Error 500 caused by file name containing '\n' character

With GitLab CE version 11.2 and before, running on Ubuntu 16.04 LTS we have a repository containing a folder with one file in it, with the '\n' character in its file name. When the user navigates in the GitLab CE Web UI into said folder, GitLab CE will issue a message resembling:


logo

500

Whoops, something went wrong on our end.

The GitLab log files contain the error 500 but nothing recorded before the error suggests a reason for the "Whoops". Refreshing the web browser, changing the web browser, restarting GitLab CE or waiting a while makes no difference.

Renaming the file in Nautilus to eliminate the single '\n' character works around the problem.

Attached is a screenshot showing the offending file name:

File-with-CR-embedded-in-its-name

See that little box in the file name? It shows 000A inside, the LF or '\n' character.

Edited by johannes rexx