credentials callback not returning credentials causes a segmentation fault
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.3k
- Forks
- 293
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Ruby reproduction using Rugged::Repository.clone_at and a credentials callback returning nil. Inspect on_headers_complete at http.c:379, focusing on the empty t->cred case, and verify that cloning against an authentication-required repository no longer segfaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, git, ruby
- Domain
- authentication, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100