Project

General

Profile

Actions

Defect #6054

closed

Error 500 on filenames with whitespace in git reposities

Added by Georg Lukas over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
SCM
Target version:
Start date:
2010-08-06
Due date:
% Done:

100%

Estimated time:
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

redmine-allow-filenames-with-spaces-on-git.patch (983 Bytes) redmine-allow-filenames-with-spaces-on-git.patch Patch to fix shell quoting of filenames in GitAdapter.lastrev() Georg Lukas, 2010-08-06 11:20
Actions

Also available in: Atom PDF