Project

General

Custom queries



Profile

Actions

Defect #6054

closed

Error 500 on filenames with whitespace in git reposities

Added by Georg Lukas over 14 years ago. Updated over 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
#5

Updated by Felix Schäfer over 14 years ago

  • Affected version (unused) changed from 0.8.4 to devel
  • Affected version deleted (0.8.4)
#7

Updated by Felix Schäfer over 14 years ago

  • Target version set to 1.0.2
#8

Updated by Eric Davis over 14 years ago

  • Status changed from New to Resolved
  • Assignee set to Eric Davis
  • % Done changed from 0 to 100
  • Resolution set to Fixed
#9

Updated by Eric Davis over 14 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF