Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: fix basic auth with empty password #980

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

dtrifiro
Copy link
Contributor

When authenticating using basic auth and only providing username (no password) the default value of None was cast to string, resulting in an attempt to authenticate using <username>:None instead of providing an empty password.
This broke authentication when providing an auth token as username (https://token@github.com/...)

Also see iterative/dvc#7898 (comment)

When authenticating using basic auth and only providing username (no
password) the default value of `None` was cast to string, resulting
in an attempt to authenticate using `<username>:None` instead of
providing an empty password.
This broke authentication when providing an auth token as username.
See iterative/dvc#7898 (comment)
@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2022

Codecov Report

Merging #980 (f37af59) into master (31490d6) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #980      +/-   ##
==========================================
- Coverage   85.13%   85.05%   -0.08%     
==========================================
  Files          93       93              
  Lines       22959    22980      +21     
  Branches     3368     3368              
==========================================
+ Hits        19545    19546       +1     
- Misses       2953     2983      +30     
+ Partials      461      451      -10     
Impacted Files Coverage Δ
dulwich/client.py 78.33% <100.00%> (ø)
dulwich/tests/test_client.py 98.27% <100.00%> (+0.04%) ⬆️
dulwich/tests/test_hooks.py 96.42% <0.00%> (-3.58%) ⬇️
dulwich/patch.py 92.39% <0.00%> (-1.64%) ⬇️
dulwich/tests/utils.py 98.60% <0.00%> (-1.40%) ⬇️
dulwich/tests/test_patch.py 95.93% <0.00%> (-1.17%) ⬇️
dulwich/tests/compat/test_client.py 91.22% <0.00%> (-0.93%) ⬇️
dulwich/tests/test_index.py 98.07% <0.00%> (-0.73%) ⬇️
dulwich/repo.py 89.80% <0.00%> (-0.27%) ⬇️
dulwich/config.py 82.07% <0.00%> (-0.26%) ⬇️
... and 1 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@jelmer jelmer merged commit 55f151d into jelmer:master Jun 20, 2022
@dtrifiro dtrifiro deleted the fix-credentials branch June 21, 2022 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants