Trailing spaces are allowed in file names created through gitlab interface
Summary
When creating a new file through the gitlab interface, trailing spaces are allowed in filenames which can cause issues that aren't immediately obvious. I can see the "well don't put trailing spaces in if you don't want" them argument", but that seems like bad UX for the many in order to benefit the few (that may want trailing spaces in their file names for some weird reason)
Steps to reproduce
- Add a file with trailing spaces in the filename.
-
git pull
to your local repo - try and open in your favorit text editor and wonder why it's blank.
Example Project
Apparently, this happened to someone in gitlab-examples: gitlab-examples/scala-sbt@2cdb76ec
What is the current bug behavior?
Trailing spaces are allowed when creating new files.
What is the expected correct behavior?
The file names are trimmed upon creation (or form validation to let me know that's wierd)
Relevant logs and/or screenshots
N/A
Output of checks
N/A
Results of GitLab environment info
I don't have sudo access, but it's running GitLab 9.4.4.
Results of GitLab application Check
I don't have sudo access
Possible fixes
Trim the file names upon creation (or add form validation)