DoS on wrong password
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
As discussed in upstream bug report saltstack/salt#38230 pygit2 tries to authenticate indefinite with wrong credentials instead of failing after two consecutive failures with same authentication token as specified by https://tools.ietf.org/html/rfc7235#section-3.1
Possible a libgit2 Bug if it's reproducable with other language bindings.
Testcase:
nginx dummy server configuration
This is just a stub configuration, no real repository needed
location ~ /git(/.*) {
add_header "WWW-Authenticate" "Basic realm=\"Closed Areas\"" always;
return 401;
}
test client
#!/bin/python2.7
import pygit2
username = 'dummyUser'
password = 'dummyPassword'
credentials = pygit2.UserPass(username, password)
callbacks = pygit2.RemoteCallbacks(credentials)
pygit2.clone_repository("http://git.demo.local/git/test.git", "test.git", bare=True, callbacks=callbacks)
Contributor guide
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 Python testcase using pygit2.UserPass, pygit2.RemoteCallbacks, and pygit2.clone_repository against the supplied nginx configuration. Reproduce the repeated authentication attempts and compare the behavior with RFC 7235 section 3.1. Done means the clone fails after two consecutive failures with the same authentication token, while confirming whether the behavior is specific to pygit2 or libgit2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- authentication, networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100