rugged icon indicating copy to clipboard operation
rugged copied to clipboard

credentials callback not returning credentials causes a segmentation fault

Open brandonweeks opened this issue 9 years ago • 0 comments

require 'rugged'

def credentials
  lambda do |_, _, _|
    return nil
  end
end

Rugged::Repository.clone_at 'https://github.com/example/my-project.git', 'my-project' , { credentials: credentials }

Calling clone_at with a credentials callback that returns nil against a repository that requires authentication causes a segmentation fault. When on_headers_complete tries to dereference t->cred->credtype (http.c:379) and t->cred is empty the segfault is triggered.

brandonweeks avatar Aug 18 '16 17:08 brandonweeks