Actions
Defect #6054
closedError 500 on filenames with whitespace in git reposities
Defect #6054:
Error 500 on filenames with whitespace in git reposities
Resolution:
Fixed
Affected version:
Description
Getting a directory listing from GIT crashes Redmine with an internal server error when a file has whitespace in its name:
NoMethodError (private method `split' called for nil:NilClass):
/lib/redmine/scm/adapters/git_adapter.rb:93:in `lastrev'
/lib/redmine/scm/adapters/abstract_adapter.rb:193:in `call'
/lib/redmine/scm/adapters/abstract_adapter.rb:193:in `shellout'
/lib/redmine/scm/adapters/abstract_adapter.rb:191:in `popen'
/lib/redmine/scm/adapters/abstract_adapter.rb:191:in `shellout'
/lib/redmine/scm/adapters/abstract_adapter.rb:177:in `shellout'
/lib/redmine/scm/adapters/git_adapter.rb:92:in `lastrev'
/lib/redmine/scm/adapters/git_adapter.rb:77:in `entries'
/lib/redmine/scm/adapters/git_adapter.rb:65:in `each_line'
/lib/redmine/scm/adapters/git_adapter.rb:65:in `entries'
....
This is caused by inadequate quoting of path names in GitAdapter.lastrev(), which affects at least 0.8.4, but seems unfixed in 1.0rc and trunk as well. A patch fixing this issue is attached.
Files
Actions